From: Rimantas Liubertas Date: 2008-10-08T06:42:37+09:00 Subject: Re: Looking for more Ruby-like way to create an array 2008/10/8 Steve Nicholson : > I'm creating an array that is the result of the members of another array > each multiplied by 100. Here's what I have: > > converted_array = [] > original_array.each {|line| converted_array << line.to_f * 100} > > This works, but I'm wondering if there is a more idiomatically "Ruby" > way of doing it. converted_array = original_array.map{|item| item.to_f * 100} Regards, Rimantas -- http://rimantas.com/