From: jim finucane Date: 2008-09-19T01:01:51+09:00 Subject: Re: Preserve insert order in a Hash ------=_Part_22587_14170750.1221754168742 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline If scale is needed this has been implemented by Takuma Ozawa as a very efficient RB tree which I used on a Mac: sudo gem install rbtree irb require 'rbtree' a=RBTree.new a['x']=1 a['z']=2 a['y']=3 a ============> #RBTree:{'x'=>1,'y'=>3,'z'=>2} On Thu, Sep 18, 2008 at 11:47 AM, ara.t.howard wrote: > > On Sep 18, 2008, at 3:42 AM, Me Me wrote: > > Hi, >> I would like to know if it's possible to insert values in a Hash and >> then extract all of them in the same insertion order. >> >> I noticed that if I then try to print the content of an Hash using >> "each" the order is not the same as the insertion. >> >> Thanks >> -- Posted via http://www.ruby-forum.com/. >> >> > > gem install orderedhash > > a @ http://codeforpeople.com/ > -- > we can deny everything, except that we have the possibility of being > better. simply reflect on that. > h.h. the 14th dalai lama > > > > > ------=_Part_22587_14170750.1221754168742--