From: Johan Holmberg Date: 2009-08-23T05:32:15+09:00 Subject: [ruby-core:25039] [Bug #1982] Kernel.load(..., true) --> scope problem Bug #1982: Kernel.load(..., true) --> scope problem http://redmine.ruby-lang.org/issues/show/1982 Author: Johan Holmberg Status: Open, Priority: Normal Category: core ruby -v: ruby 1.9.2dev (2009-07-18 trunk 24186) In a file loaded with "Kernel.load(..., true)", the way constants are looked up has changed since 1.8. The attached script "helloworld.rb" works in Ruby 1.8, but fails in Ruby 1.9. It should be invoked like below to provoke the error: $ ruby1.9 -e 'load "helloworld.rb", true' The error I get is: helloworld.rb:8:in `say': uninitialized constant #::HelloWorld::Hello (NameError) from helloworld.rb:12:in `' from -e:1:in `load' from -e:1:in `
' The behaviour of 1.9 seems like a bug to me. It makes it almost impossible to write code in a file loaded this way (with the "true" parameter to "Kernel.load"). ( see also my previous mail about this in [ruby-core:22033] ) ---------------------------------------- http://redmine.ruby-lang.org