Project Euler #10 in Ruby. Three ways to sum primes below 2 million
You should use implicit looping (filtering):

def primes_below(limit)
    (1..limit).select{|i| Prime.prime?(i)}
end


You should use the built-in profiler:

require 'benchmark'
puts Benchmark.measure{primes_below(limit).inject(:+)}