From: Harry Kakueki Date: 2012-11-30T15:19:55+09:00 Subject: Re: Ordered Hash (v. 1.8) > creation. However, what I'd really like to do is, after the hash has > been created, sort it on the key in a manner similar to the way that I > would sort an array with the sort!() method and then preserve the sorted > order. Any ideas on how I might accomplish that feat? Thanks for any > input. > > ... doug Does this work? h = {} arr = ["t","c","h","b","l"] arr.each{|x| h[x] = x + "ook"} h = Hash[h.sort] p h #> {"b"=>"book", "c"=>"cook", "h"=>"hook", "l"=>"look", "t"=>"took"} Harry