From: Bob Hutchison Date: 2005-09-26T11:21:38+09:00 Subject: Is there a hash-like class that maintains insertion order Hi, Is there a Hash-like class that maintains insertion order and, ideally, allows 'retrieval' by either key or index? I googled around for this but can't seem to hit on a query string that is useful. In a perfect implementation I'd be able to do something like: hash = HashMaintainingInsertionOrder.new hash["a"] = "aaa" hash["b"] = "bbb" hash["c"] = "ccc" assert_equal(hash["a"], hash[0]) assert_equal(hash["b"], hash[1]) assert_equal(hash["c"], hash[2]) Thanks, Bob ---- Bob Hutchison -- blogs at Recursive Design Inc. -- Raconteur --