On Jan 4, 2006, at 8:24 AM, dblack / wobblini.net wrote: > > You can use sort_by, though: > > sorted_freq = char_freq.sort_by {|a| [-a[1], a[0]] } The light bulb will go on with respect to this solution when you discover that x <=> y works as expected when x and y are Arrays. I think this is one of those cases where Ruby just makes you feel warm all over. Gary Wright