Is it possible somehow to get a hash in the order it was created? For example:
CODE
myhash = {
"one" => 1,
"two" => 2,
"three" => 3,
}
myhash.each { |item}
p item
}
I want myhash to be printed in the order it was created, but I can't do that. If I can't do that with a hash, can I do it using another structure? I don't think I can use a string as an array index.