From: Rein Henrichs Date: 2010-06-07T09:40:06+09:00 Subject: Re: comparing objects I agree that using eql? and hash for some methods is surprising. I would not mind seeing this changed to at least just eql?. == seems too general for the semantics of these methods. On 2010-06-06 15:03:30 -0700, Benoit Daloze said: > PS: Rein: I saw your implementation of #hash. I think to "add one" is > useless, because #eql? is always used (so even if #hash was always the same, > it would work). It could maybe speed up a bit, but only if you have a lot of > comparison of User and User's instances, which is very unlikely. Without the + 1, User.new('').hash == User.hash. I don't like the existance of a bug even if I don't yet have a way to exercise it in my code. -- Rein Henrichs http://puppetlabs.com http://reinh.com