2008/10/8 Steve Nicholson <ssteve / mac.com>:
> 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/