From: Christoffer Sawicki Date: 2007-07-10T21:27:52+09:00 Subject: Re: Beautiful Code : Pity he didn't ask here... Hello. On 7/10/07, John Carter wrote: > count.keys.sort_by{|key| count[key]} IMHO, the most elegant way to do this is: hash.sort_by { |k, v| v }.map { |k, v| k } ...where k = key and v = value. Cheers, -- Christoffer Sawicki http://vemod.net/