From: Austin Ziegler Date: 2007-11-18T05:34:35+09:00 Subject: Re: Hash -> Struct On 11/17/07, Trans wrote: > Given that a hash is not ordered, is this reliable? > > h = { :a=>1, :b=>2 } > Struct.new(*h.keys).new(*h.values) > => # a=1, b=2> It's reliable; it's not thread-safe (making it potentially unreliable). -austin -- Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/ * austin@halostatue.ca * http://www.halostatue.ca/feed/ * austin@zieglers.ca