Array#reverse fails on frozen arrays
------------------------------------
Key: JRUBY-4297
URL: http://jira.codehaus.org/browse/JRUBY-4297
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.x+
Reporter: Daniel Luz
Priority: Minor
Attachments:
0001-Removed-modification-check-from-RubyArray-reverse-as.patch
RubyArray#reverse() calls modify() for (apparently) no reason, as this method
returns a new array.
$ ruby -e 'p [1,2,3].freeze.reverse'
[3, 2, 1]
$ ruby1.9 -e 'p [1,2,3].freeze.reverse'
[3, 2, 1]
$ jruby -e 'p [1,2,3].freeze.reverse'
-e:1: can't modify frozen array (TypeError)
I don't think this is worth a permanent test case.
--
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