From: Pete Date: 2005-11-08T03:37:19+09:00 Subject: Re: an array of hashes @person.telephones.map {|x| x.number}.join(', ') On Mon, 07 Nov 2005 19:22:13 +0100, Francesco wrote: > Hello all! > Can this be done better/nicer? > In @person i have an array of telephones. telephone is a hash with an id > and a number, and i would like to join them. > > @person.telephones.collect {|x| [] << x.number}.join(', ') > > I don't know why, but I don't like this line of code... how would you > write it? >