From: Guido De Rosa Date: 2010-10-07T17:32:22+09:00 Subject: Re: "map" a deeply nested structure: Object#deep_map Guido De Rosa wrote: > Robert Klemme wrote: >> >> But according to that logic *all* collections returned should be >> Arrays. So out = {} would become out = []. > > Enumerable#map returns an Array on any object except wen the object is a > Hash: in such case it returns another Hash. And so should do #deep_map. Ouch! It actually returns an Array of key-value pairs. Sorry for the mistake. I will consider you point, then ;) . G. -- Posted via http://www.ruby-forum.com/.