M
Mario Ruiz
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
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