Array subclass: uniq, flatten, other methods (?) do not clone correctly -----------------------------------------------------------------------
Key: JRUBY-3646 URL: http://jira.codehaus.org/browse/JRUBY-3646 Project: JRuby Issue Type: Bug Components: Core Classes/Modules Affects Versions: JRuby 1.2, JRuby 1.1.6 Reporter: Billy Reisinger Priority: Minor Given this code: class MyArray < Array attr_accessor :foo def initialize @foo = "bar" end end my_a = MyArray.new p my_a.uniq.foo p my_a.flatten.foo p my_a.foo This is the output from Jruby 1.3.0RC2 (jruby 1.3.0RC2 (ruby 1.8.6p287) (2009-05-12 eb8fea4) (Java HotSpot(TM) Client VM 1.5.0_16) [i386-java]) nil nil "bar" This is the output from (C) ruby 1.8.6: "bar" "bar" "bar" Granted this is an unusual case... but it is inconsistent and led to a hard-to-track-down bug. -- 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