From: "DanDiebolt.exe" Date: 2008-10-08T06:44:14+09:00 Subject: Re: Looking for more Ruby-like way to create an array --0-856052461-1223415973=:59452 Content-Type: text/plain; charset=us-ascii a=[1,2,3] a.map (|item| 100*item} --- On Tue, 10/7/08, Steve Nicholson wrote: From: Steve Nicholson Subject: Looking for more Ruby-like way to create an array To: "ruby-talk ML" Date: Tuesday, October 7, 2008, 5:33 PM 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. -- Posted via http://www.ruby-forum.com/. --0-856052461-1223415973=:59452--