Array#initialize should not modify frozen array
-----------------------------------------------
Key: JRUBY-1876
URL: http://jira.codehaus.org/browse/JRUBY-1876
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.x
Environment: Latest JRuby 1.1b1
Reporter: Vladimir Sizikov
Attachments: array-initialize-frozen.patch
Consider the following example:
{noformat}
[1, 2, 3].freeze.instance_eval { initialize }
{noformat}
On JRuby, this basically clears the frozen array.
On the latest MRI 1.8.6, the code above leads to TypeError.
This also leads to a rubyspec failure for Array.
The proposed patch (with regression test) fixes the problem.
--
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