From: Avi Bryant Date: 2001-01-19T12:36:45+09:00 Subject: [ruby-talk:9534] Re: Strange Hash behavior On Fri, 19 Jan 2001, Agnot Tok wrote: > h = {} > h[C.new(1)] = 1 > h[C.new(1)] = 2 > puts h.inspect > > evaluate to {1=>1, 1=>2} and not {1=>2}? > I thought Hash used the hash method?! But it will also use some method to test equality... I don't remember offhand which one, but try also defining ==. avi