From: Kristof Bastiaensen Date: 2004-08-08T03:26:22+09:00 Subject: Re: Sets are not extensional hi, On Sat, 07 Aug 2004 16:45:22 +0000, Reimer Behrends wrote: > Note that to_a.hash is effectively non-deterministic. If @hash == { 1 => > true, 2 => true }, then to_a can be both [1, 2] and [2, 1], with different > hash values. As far as I know, hash.to_a always generates the same array. The reason is that hashes are in fact unordered, so if you give the same elements in a different order, it is still the same Hash. That means that when hash1 == hash2, then hash1.to_a == hash2.to_a. So fortunately there is no need to use map or sort. Regards, KB