Mario Ruiz | 15 May 18:21

Access Hash in the same order that was created

I need to access to a Hash in the same order that It was created:

mh=Hash.new()
mh["one"]="1"
mh["two"]="2"
mh["three"]="3"
mh["four"]="4"

mh.each {|val|
  puts val[0]
}

In this example I get:
three
two
one
four

and I would like to get:
one
two
three
four

is that possible?

Thanks
--

-- 
Posted via http://www.ruby-forum.com/.


Gmane