How do you sort a hash in ruby based on the value and then key? For example
h = {4 => 5, 2 => 5, 7 => 1}
would sort into