From: Todd Benson Date: 2007-08-30T23:47:27+09:00 Subject: Re: How to make an array of hashes to a single array with all the values of these hashes ? On 8/30/07, Robert Klemme wrote: > 2007/8/29, yermej@gmail.com : > > On Aug 29, 2:53 pm, dima wrote: > > my_new_array = myvalue.inject([]) {|arr, h| arr + h.values} > > That's already pretty good (you used #inject ;-)) but this one is > slightly more efficient: > > my_new_array = myvalue.inject([]) {|arr, h| arr.concat h.values} Nice. You beat me to it. One of these days, though, I'll read all the Ruby source and exact vengeance upon you guys :) For a short repeat of the record for the nubies, #concat supposedly doesn't create new objects, and thus is more "efficient". Todd