From: Dark Ambient Date: 2006-08-13T00:08:15+09:00 Subject: Re: map or collect with multidimension arrays I know they are interchangeable But I can't make it work. For instance - x = [["john", "doe"],["mary", "jane"],["jim","richards"],['sue","scott"]] y = x.map {|i| i + "name" } p y It's returning nil on me ???? Stuart On 8/12/06, Robert Klemme wrote: > dblack@wobblini.net wrote: > > Hi -- > > > > On Sat, 12 Aug 2006, Dark Ambient wrote: > > > >> What would be the proper call to a multi array either collect or map > >> ? > > > > There's no single proper thing to do; it depends entirely on the task > > at hand. > > DA, note also that map and collect are synonyms. It doesn't matter which of > the two you use. :-) > > robert > > >