Issue Type: Bug Bug
Affects Versions: JRuby 1.7.0.pre1
Assignee: Unassigned
Attachments: helloworld.rb
Components: Core Classes/Modules
Created: 21/Jun/12 8:02 PM
Description:

Early versions of MRI 1.9.2 had a "scope" problem when Kernel.load was used with a "true" second parameter. I reported it as

http://bugs.ruby-lang.org/issues/1982

JRuby seem to fail in the same way (both in 1.8 and 1.9 mode). I attach a script showing the problem. JRuby reports:

$ jruby -e 'load "helloworld.rb", true' 
NameError: uninitialized constant #<Module:0x4a005364>::HelloWorld::Hello
  const_missing at org/jruby/RubyModule.java:2715
            say at /Users/johan/proj/rcons-stuff/rcons-cpp/helloworld.rb:17
         (root) at /Users/johan/proj/rcons-stuff/rcons-cpp/helloworld.rb:21
           load at org/jruby/RubyKernel.java:1017
         (root) at -e:1

but if run with the second paramter set to "false" it works better:

$ jruby -e 'load "helloworld.rb", false'
Hello
World

I think it should have worked in the first case too.

Environment: MacOS X 10.6.8
Project: JRuby
Priority: Major Major
Reporter: Johan Holmberg
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to