-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Labels
Milestone
Description
While digging through some stuff for Truffle, I came across an issue when calling an undefined variable or method. MRI raises a NameError. JRuby and Rubinius raise a NoMethodError.
$ ruby -v
ruby 1.9.3p374 (2013-01-15 revision 38858) [x86_64-linux]
$ ruby -e 'a'
-e:1:in `<main>': undefined local variable or method `a' for main:Object (NameError)
$ ruby -v
ruby 2.2.0preview2 (2014-11-28 trunk 48628) [x86_64-linux]
$ ruby -e 'a'
-e:1:in `<main>': undefined local variable or method `a' for main:Object (NameError)
$ bin/jruby -v
jruby 9.0.0.0-SNAPSHOT (2.2.0p0) 2014-12-08 8a5ba25 Java HotSpot(TM) 64-Bit Server VM 24.72-b04 on 1.7.0_72-b14 +jit [linux-amd64]
$ bin/jruby -e 'a'
NoMethodError: undefined method `a' for main:Object
__script__ at -e:1
$ bin/jruby -X+T -v
jruby 9.0.0.0-SNAPSHOT (2.2.0p0) 2014-12-08 8a5ba25 Java HotSpot(TM) 64-Bit Server VM 24.72-b04 on 1.7.0_72-b14 +jit [linux-amd64]
$ bin/jruby -X+T -e 'a'
-e:1:in `method_missing': undefined method `a' for org.jruby.truffle.runtime.core.RubyBasicObject@4ff2cd7f (NoMethodError)
from -e:1:in `<main>'
Reactions are currently unavailable