Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.6.7
-
Fix Version/s: JRuby 1.7.0.pre1
-
Component/s: None
-
Labels:None
-
Environment:Windows 7
-
Testcase included:yes
-
Number of attachments :
Description
Kernel.autoload doesn't seem to work with the Time class, while Module.autoload does work.
% jruby -v
jruby 1.6.7 (ruby-1.8.7-p357) (2012-02-22 3e82bc8) (Java HotSpot(TM) Client VM 1.6.0_17) [Windows 7-x86-java]
Run the following script:
autoload :Bar, 'bar'
puts autoload?(:Bar)
autoload :Time, 'time'
puts autoload?(:Time)
module Foo
end
Foo.autoload :Time, 'time'
puts Foo.autoload?(:Time)
I see the following output:
bar
nil
time
when I would expect to see the following:
bar
time
time
Unit test file attached to demonstrate the bug.
Issue Links
- relates to
-
JRUBY-6508
timecop tests fail (because date library is always loaded)
-
Confirmed on master.