From: sto.mar@... Date: 2012-11-30T23:34:59+09:00 Subject: Re: Ordered Hash (v. 1.8) Am 30.11.2012 08:09, schrieb Harry Kakueki: > # If you want to also keep the original order, maybe this is worth a look. > # I'm using 1.9 so I can't test it for your setup. > > class Hash > def myway > Hash[*sort.flatten] #Ruby 1.8 ? > #Hash[sort] # Ruby1.9 > end > end This does not work in 1.8, because hashes in 1.8 do *not* keep the insertion order. --