File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 66
66
test /prawn
67
67
test /rails
68
68
test /testapp /testapp
69
+ test /truffle /* .methods
69
70
tool /nailgun /Makefile
70
71
tool /nailgun /config.log
71
72
tool /nailgun /config.status
Original file line number Diff line number Diff line change
1
+ =begin
2
+ Run first with JRuby+Truffle, then with MRI:
3
+
4
+ $ .../jruby -X+T test_methods_parity.rb > truffle.methods
5
+ $ .../ruby test_methods_parity.rb truffle.methods > mri.methods
6
+ Compare with:
7
+ $ git diff -U10 --no-index mri.methods truffle.methods
8
+ Red is what we don't implement yet,
9
+ Green is methods not existing in MRI (which should be fixed!)
10
+ =end
11
+
12
+ start = BasicObject # Numeric
13
+
14
+ modules = Object . constants . sort . map { |c |
15
+ Object . const_get ( c )
16
+ } . select { |v |
17
+ Module === v and !v . instance_methods ( false ) . empty?
18
+ } . select { |mod |
19
+ !mod . name . end_with? ( "Error" )
20
+ } . select { |mod |
21
+ mod <= start
22
+ }
23
+
24
+ if RUBY_ENGINE == "ruby" and truffle_file = ARGV . first
25
+ truffle_modules = File . readlines ( truffle_file ) . map ( &:chomp ) . grep ( /^[A-Z]/ )
26
+ modules = modules . select { |mod | truffle_modules . include? mod . name }
27
+ end
28
+
29
+ modules . each do |mod |
30
+ puts
31
+ puts mod . name
32
+ puts mod . instance_methods ( false ) . sort
33
+ end
You can’t perform that action at this time.
0 commit comments