@Matthew: that was funny :)

And I agree, should have used more descriptive variable names and 'i'
isn't a good choice as it's mostly used for indices.

  array.inject(0) { |sum, element| sum + element }

-- 
Posted via http://www.ruby-forum.com/.