From: Mathieu Bouchard Date: 2001-03-10T01:27:34+09:00 Subject: [ruby-talk:12336] Re: Q re looping structures On Sat, 10 Mar 2001, ts wrote: > >>>>> "M" == Mathieu Bouchard writes: > M> a=[7]; a< M> b=[7,[7]]; b[1]< M> a==b > >> -:4:in `==': detected recursive container object (TypeError) > M> No, I mean, if we were to say that such structures should be comparable, > M> i.e. if the result of a==b should be true or false, which one would you > M> pick and why? > You have the response. In this case you can't give a result, this is why > it give an error message. > Perhaps Christoph Rippel can better explain it. Ok, I thought it would be possible to answer "true" meaningfully. If the comparison is topological, the answer is obviously "false", but I don't think == should compare topology: only values should be compared, so that a=[[42]];a<