From: "Molitor, Stephen L" Date: 2006-06-28T01:53:06+09:00 Subject: Re: Speaking of eql? (was: Ruby and Java equality usage) >>>> "Robert Dober" writes: > Note something that's peripherally related to == and eql? is the > method "hash", which subclasses MUST override if they override eql? > or == so that the guarantee: > > a.eql?(b) implies a.hash == b.hash > > is maintained. 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. Steve