Nikolai Weibull ha scritto: > * itsme213 <itsme213 / hotmail.com> [Dec 02, 2004 14:00]: > >>Is there a pure-ruby ordered hash? I'm looking for something that will >>preserve the order in which key/value pairs were entered. The one on >>RAA is buggy http://raa.ruby-lang.org/project/orderedhash/ > > > Having an ordered Hash is like saying that arrays should be indexed by > strings--it's simply not what they are meant to be. <kidding> but sometimes they are :) >> a=[1,2] => [1, 2] >> b=['one' ,'two'] => ['one', 'two'] >> c=a,b => [[1, 2], ['one', 'two']] >> c.assoc 'one' => ['one', 'two'] </kidding>