15 May 18:37
Re: Access Hash in the same order that was created
From: Tor Erik Linnerud <tel <at> jklm.no>
Subject: Re: Access Hash in the same order that was created
Newsgroups: gmane.comp.lang.ruby.general
Date: 2008-05-15 16:37:19 GMT
Subject: Re: Access Hash in the same order that was created
Newsgroups: gmane.comp.lang.ruby.general
Date: 2008-05-15 16:37:19 GMT
ara.t.howard wrote:
> is that possible?
Hash preserves insertion order in Ruby 1.9
irb(main):026:0> RUBY_VERSION
=> "1.9.0"
irb(main):027:0> mh.each{|val| puts val[0]}
one
two
three
four
regards,
Tor Erik
--
--
Posted via http://www.ruby-forum.com/.
RSS Feed