You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>'
The text was updated successfully, but these errors were encountered:
Fixing it in Truffle got another rubyspec passing. It's possible there's a win like that for non-Truffle JRuby. But otherwise, I agree it's low priority.
Can be closed. Both 9.1.9.0 and 1.7.21 raise a NameError:
ruby -v
jruby 9.1.9.0 (2.3.3) 2017-05-15 28aa830 Java HotSpot(TM) 64-Bit Server VM 25.131-b11 on 1.8.0_131-b11 [darwin-x86_64]
ruby -e 'a'
NameError: undefined local variable or method `a' for main:Object
<main> at -e:1
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.
The text was updated successfully, but these errors were encountered: