Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.6.5, JRuby 1.6.6, JRuby 1.7.0.pre1
-
Fix Version/s: JRuby 1.6.6
-
Component/s: Ruby 1.9.2, Ruby 1.9.3
-
Labels:None
-
Testcase included:yes
-
Number of attachments :
Description
In MRI 1.9 when adding the optional flag to const_get it doesn't just prevent lookup in superclasses but also at the toplevel.
Basically Enumerable.const_get(:Array, false) raises a NameError in MRI.
In JRuby this is not the case.
I have created two RubySpec test cases that checks and expects the MRI behavior and therefore fails with JRuby. https://github.com/rubyspec/rubyspec/pull/86
It is also worth mentioning that constantize in activesupport expects and builds on the MRI behavior, causing subtle problems.
Fixed on master@404c280 and jruby-1_6@c9c292b.