From: Daniel Martin Date: 2006-06-28T03:16:48+09:00 Subject: Re: Speaking of eql? "Molitor, Stephen L" writes: > I would reword that slightly. You should override hash if you eql?. > But not if you only override '==', as '==' is not involved in hashes or > the hash contract. The problem with that is that the default definition of eql? is: def eql?(other) self == other end So if you override ==, then you need to override either eql? (to have it mean the same as Object#eql?) or hash. My very strong recommendation, if you're only going to override one of those, would be to override hash (rather than simply overriding eql? to mean the same as equal?), since otherwise Hash objects with your objects as key won't behave properly, and neither will Set s of your objects.