From: Robert Klemme Date: 2004-04-26T17:44:11+09:00 Subject: Re: Array to Hash "Mark Hubbart" schrieb im Newsbeitrag news:4DF38309-95D3-11D8-9D1D-000502FDD5CC@mac.com... > > On Apr 24, 2004, at 2:24 AM, Robert Klemme wrote: > > > So the question is wich representation Enumerable#to_h should expect - > > nested or sequence? > > It seems to me that it should be the one that Hash#to_a generates: > nested pairs. They're already almost a hash anyway; Array has a few > methods for that "format" that allow you to lookup items as if it were > a hash. Why not be able to convert to and from? Makes sense to me. If it is a Hash then why don't you have the data in a hash in the first place? I mean, the data should not reside in an array if they are to be used hash-like. Dunno whether this kind of conversion occurs often. I for my part didn't need that till today. Just my 0.02... robert