In MRI 1.9 the flag for Module#const_get also controls lookup of toplevel
constants but not in JRuby
----------------------------------------------------------------------------------------------------
Key: JRUBY-6224
URL: https://jira.codehaus.org/browse/JRUBY-6224
Project: JRuby
Issue Type: Bug
Components: Ruby 1.9.2, Ruby 1.9.3
Affects Versions: JRuby 1.6.5, JRuby 1.6.6, JRuby 1.7
Reporter: Brian Olsen
Assignee: Thomas E Enebo
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.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email