Array should provide its own map method
---------------------------------------
Key: JRUBY-4206
URL: http://jira.codehaus.org/browse/JRUBY-4206
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.4
Reporter: Vladimir Sizikov
Assignee: Vladimir Sizikov
Fix For: JRuby 1.5
Currently, RubyArray uses the map implementation from RubyEnumerable, which
causes some incompatibility with MRI.
Take a look:
{code}
require 'sane' # this gem customizes map behavior for both Enumarable and Array
p [5].collect{ |x| x+1 }
{code}
In MRI it will correctly print [6], bun in JRuby we'll get StackOverflowError!
The reason for error: since there is no Array.map, redefining map() in
Array/Enumerable leads to this infinite loop.
Will fix.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
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