Would this be the best way to sort a hash and return Hash object (instead of Array):
h = {\"a\"=>1, \"c\"=>3, \"b\"=>2, \"d\"=>4} # => {\"a\"=
@ordered = {} @unordered.keys.sort.each do |key| @ordered[key] = @unordered[key] end