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.
Activity
Charles Oliver Nutter
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Assignee | Thomas E Enebo [ enebo ] | Charles Oliver Nutter [ headius ] |
| Fix Version/s | JRuby 1.6.6 [ 18033 ] | |
| Resolution | Fixed [ 1 ] |
Charles Oliver Nutter
made changes -
| Status | Resolved [ 5 ] | Closed [ 6 ] |