From: ts Date: 2003-01-03T23:42:50+09:00 Subject: Re: sort the hash keys >>>>> "M" == Mark Probert writes: M> My mistake. That should have been M> hash_a.sort { |item| # item is array [key, value] I don't understand, sorry, but Hash#sort will use the block to sort the hash and item is [[key0, value0], [key1, value1]] no ? and you can write it hash_a.sort do |(k0, v0), (k1, v1)| # compare k0, v0, k1, v1 end Guy Decoux