From: Ben Tilly Date: 2001-02-26T12:08:23+09:00 Subject: [ruby-talk:11559] Re: Array bugs? You know, some days it is better to not try to write code...? This should work, but for the wrong reason... "Ben Tilly" wrote: > >"Ben Tilly" wrote: >> >>"Christoph Rippel" wrote: [...] > > class Array > @@other_id = nil > @@other_seen = nil > > def == (other) > if @@other_id.nil? > begin > @@other_id = Hash.new( nil ) > @@other_seen = Hash.new( false ) > return self == other > ensure > @other_id = nil Here you should set @@other_seen to nil. It actually works as it stands because you wipe it out anyways, but that is ugly... > end > else [...] Cheers, Ben _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com