From: Patrick Hurley Date: 2006-08-27T12:20:45+09:00 Subject: Re: Ruby == how does it works? On 8/26/06, Jeremy Tregunna wrote: > On 06-08-26, at 03:33, Surendra Singhi wrote: > > Does the Ruby '==' operator compares the 'object_ids' of the > > element before > > Depends on how the object receiving it implements it. > More exactly == is a method -> class Foo def==(other) self.class == other.class end end f = Foo.new g = Foo.new f == 7 => false f == f => true f == g => true pth