From: George Ogata Date: 2004-06-19T13:08:21+09:00 Subject: Re: How to make generic #== method? Lennon Day-Reynolds writes: >> > 2) It doesn't work if the class has hash attribute because >> > {'a' => 1}.hash != {'a' => 1}.hash >> >> Now that is weird. I've a faint recollection of it being mentioned on >> ruby-talk before though, so perhaps its not a bug. > > This makes sense, as both hashes are mutable. Their contents may be > the same, but they shouldn't be mistaken for the same object, as > either one's value could change at any time. So are Arrays and Strings (and plently else), but they can be hashed. That's what the #rehash method is for, isn't it? One possible reason I can think of is that the default_procs should probably be compared too, but we can't compare procs in general.