From: Yohanes Santoso Date: 2002-01-06T10:54:58+09:00 Subject: [ruby-talk:30322] Re: Sorting a Hash by value of integer stored in the Hash irb(main):011:0> myh = {"z"=>5,"x"=>3,"y"=>7} irb(main):012:0> myh.sort{|a,b| a[1] <=> b[1]} [["x", 3], ["z", 5], ["y", 7]] Does that do? YS. > get. The sort apparently was performed on the keys, but I want to do sort > on the values. Is there a way to do this? > > Mike