Sorting Hash in Ruby

Submitted by swarut on Wed, 06/13/2012 - 17:15
  1.   a = { "a"=>"a", "c"=>"c",  "b"=>"b"}
  2.   sorted_hash = Hash[a.sort]