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

**URL:** <https://www.ruby-forum.com/t/bug-1508-recursive-arrays-with-the-same-structure-are-not-eql/168680>\
**Category:** Development\
**Created:** [May 24, 2009, 7:28am UTC](https://www.ruby-forum.com/t/bug-1508-recursive-arrays-with-the-same-structure-are-not-eql/168680 "2009-05-24T07:28:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yuki\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/a6a055/32.png) [@Yuki\_S](https://www.ruby-forum.com/u/Yuki_S)\
**Post date:** [May 24, 2009, 7:28am UTC](https://www.ruby-forum.com/t/bug-1508-recursive-arrays-with-the-same-structure-are-not-eql/168680/1 "2009-05-24T07:28:15Z")

</div>

Bug #1508: Recursive arrays with the same structure are not eql?.  
[http://redmine.ruby-lang.org/issues/show/1508](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

---

<div class="post-metadata">

**Author:** ![Yuki\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/a6a055/32.png) [@Yuki\_S](https://www.ruby-forum.com/u/Yuki_S)\
**Post date:** [May 24, 2009, 11:01am UTC](https://www.ruby-forum.com/t/bug-1508-recursive-arrays-with-the-same-structure-are-not-eql/168680/2 "2009-05-24T11:01:35Z")

</div>

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](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](http://redmine.ruby-lang.org/issues/show/1508)

---

<div class="post-metadata">

**Author:** ![Yuki\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/a6a055/32.png) [@Yuki\_S](https://www.ruby-forum.com/u/Yuki_S)\
**Post date:** [May 25, 2009, 2:52am UTC](https://www.ruby-forum.com/t/bug-1508-recursive-arrays-with-the-same-structure-are-not-eql/168680/3 "2009-05-25T02:52:50Z")

</div>

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](http://redmine.ruby-lang.org/issues/show/1508)
