though true a hash doesn't maintain order, you can sort the keys and
use the result to do something.... (though you couldn't return an
ordered hash)

hashes_arent_ordered = { 2=>"2", 3=>"3", 1=>"1" }
hashes_arent_ordered.keys.sort.each {|key| puts "key #{key}, value
#{hashes_arent_ordered[key]}"}

-Benjamin, Chicago