Project Euler - Smallest multiple (Ruby)
Array provides lcm() which gives you the least common multiple of two numbers. You can apply this to an entire array by applying it to each result as you go through it. This is what reduce does.

puts (1..20).reduce{|m,n| m.lcm(n)}


or even shorter:

puts (1..20).reduce(:lcm)


Because most of the calculations are done in the ruby implementation (e.g. C for MRI), this will be fast.