From: ts Date: 2001-02-24T00:55:42+09:00 Subject: [ruby-talk:11389] Re: Array bugs? >>>>> "C" == Christoph Rippel writes: C> What is the output of ``p pl == pr''? true pigeon% ruby class UnOrderedPair def ==(other) return false unless other.kind_of? UnOrderedPair return true if id == other.id return true if (@l == other.l ) && (@r == other.r) return (@l == other.r ) && (@r == other.l) end def initialize(ll,rr) @l = ll; @r = rr end protected attr_reader :l, :r end l = []; r=[] pl = UnOrderedPair.new l,r pr = UnOrderedPair.new r,l l << pl; r << pr p pl == pr ^D true pigeon% Guy Decoux