From: Rick DeNatale Date: 2007-11-14T21:34:47+09:00 Subject: Re: Ordered Hash Usefulness On Nov 14, 2007 7:01 AM, Devi Web Development wrote: > On Nov 13, 2007 4:03 PM, Trans wrote: > > > (2) A hash with multiple keys for a value. > > > > How does that behave like an ordered hash? > > An Ordered hash presumably serves the purpose of lookup of a value by > an integer, like an array, or by a normal arbitrary key No, for most people, based on quite a long thread referenced by Bill Kleb, it's a normal hash except that the order that elements are yielded by each, each_key, each_value... is defined to be the temporal order of insertion into the hash. In Ruby 1.8 the enumeration order of a Hash is undefined, in Ruby 1.9, unless it's been backed out recently, it's defined as above. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/