From: Simon Strandgaard Date: 2005-10-22T05:37:07+09:00 Subject: Re: array in hash... argh!! On 10/21/05, Trans wrote: > > res = h.values.transpose.map{|a|Hash[*h.keys.zip(a)]} > > Dang that's short! hehe > But I wonder, is it any possiblity that h.keys won't be the same order > as h.values? I think it the same as: vals = h.map{|k,v| v} keys = h.map{|k,v| k} so hopefully order is the same.. -- Simon Strandgaard