My latest finding on this bug for C ruby in both version 1.8.7 and 1.9.2 My
latest finding on this bug for C ruby in both version 1.8.7 and 1.9.2 return
the same result:

ruby 1.8.7 (2010-12-23 patchlevel 330) [i686-darwin10.6.0]

"bar"
nil
"bar"

ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-darwin10.6.0]

"bar"
nil
"bar"

Per Charles' comments (http://bit.ly/hOrbQU and http://bit.ly/idwG17), a
rubyspec with version guard should be created for missing cases. Can someone
points me to a sample of rubyspec that is using version guards? I tried to
catch either Charles (hedius) or Brian (brixen) on IRC but to no avail. I am
interested in troubleshooting this problem. Any help is much appreciated.
Thanks.


> > 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, Intro
> >    Affects Versions: JRuby 1.1.6, JRuby 1.2
> >            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
>
>
>

Reply via email to