From: Devi Web Development Date: 2007-11-14T05:53:49+09:00 Subject: Ordered Hash Usefulness On Nov 12, 2007 7:56 AM, James Edward Gray II wrote: > That little challenge made me wish for some Ruby 1.9 elements, like > an ordered Hash. > > James Edward Gray II I've been wondering what the real usefulness of an ordered hash is. Lately I've found that when I initially think of an ordered hash I really want one of the following constructs (1) An array of pairs (2) A hash with multiple keys for a value. For (2) I have implemented the second as method of hash like this: Hash.multiple_keys([1,'str',some_object]=>'a string',[valu]=>another_object) #=>{1=>'a string','str'=>'a string',valu=>another_object,some_object=>'a string'} What I really want to know is, is there some usefulness to ordered pairs I am missing? Daniel Brumbaugh Keeney