[Bug #1508] Recursive arrays with the same structure are not eql?


#1

Bug #1508: Recursive arrays with the same structure are not eql?.
http://redmine.ruby-lang.org/issues/show/1508

e$B5/I<<Te(B: Yuki S.
e$B%9%F!<%?%9e(B: Open, e$BM%@hEYe(B: Normal
Target version: 1.9.2
ruby -v: ruby 1.9.2dev (2009-05-24 trunk 23554) [i386-darwin9.7.0]

a = []
a << a

e$B$H$7$?$H$-!"e(B a e$B$He(B [a]
e$B$OF1$89=B$$r;}$C$F$$$k$N$Ge(Beql?e$B$G$9!#0lJ}!“e(Ba e$B$He(B [[a]]
e$B$OF1$89=B$$K$b$+$+$o$i$:e(B eql? e$B$G$O$”$j$^$;$s!#e(B


#2

e$B%A%1%C%He(B #1508 e$B$,99?7$5$l$^$7$?!#e(B (by ujihisa .)

e$BK\LdBj$Oe(B http://redmine.ruby-lang.org/issues/show/1448
e$B$NItJ,LdBj$G$9!#e(B

e$B$?$@!"e(B#1448e$B$NNc$,8m$C$F$$$k$N$+!"e(B

x = []; x << x
y = [[x]]
x == y # ==> true
y == x # ==> false, should be true!
e$B$NHf3S$N7k2L$,5U$K$J$C$F$7$^$9!#e(B

e$B%Q%C%A$,M?$($i$l$F$$$k$b$N$N!"$^$@E,MQ$O$5$l$F$$$J$$$_$?$$$G$9!#e(B

http://redmine.ruby-lang.org/issues/show/1508


#3

e$B%A%1%C%He(B #1508 e$B$,99?7$5$l$^$7$?!#e(B (by Yukihiro M.)

e$B%9%F!<%?%9e(B Opene$B$+$ie(BClosede$B$KJQ99e(B

#1448e$B$O$J$+$@$5$s$K$h$C$FE,MQ$5$l$^$7$?!#K\7o$be(Bclosee$B$G$9e(B

http://redmine.ruby-lang.org/issues/show/1508