Report abuse


			
[headius @ cnutter:~]
◆ jruby -e "module X; autoload :Y, 'bar/foo'; module Z; def self.yoohoo; Y; end; end; end; Z.yoohoo"
:1:in `const_missing': uninitialized constant Z (NameError)
  from :1
[headius @ cnutter:~]
◆ cat bar/foo.rb
puts 'here'
module X; Y = 1; end
[headius @ cnutter:~]
◆ jruby -e "module X; autoload :Y, 'bar/foo'; def self.yoohoo; Y; end; end; X.yoohoo"
here
[headius @ cnutter:~]
◆ jruby -e "module X; autoload :Y, 'bar/foo'; module Z; def self.yoohoo; Y; end; end; end; Z.yoohoo"
:1:in `const_missing': uninitialized constant Z (NameError)
  from :1