[1,2,3,4].map { |x| x*2 }
 
 -> [2, 4, 6, 8]

That's probably what you want.  Enumerable#map is a synonym for collect
by the way.

VInce

-- 

Vincent Foley-Bourgon
Email: vinfoley / iquebec.com
Homepage: http://darkhost.mine.nu:81