title: How to do array addition in a smart way?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1538789/how-to-sum-array-members-in-ruby">How to sum array members in Ruby?</a>  </p>
  </blockquote>
  
  
  
  <p>Lets say I have this array </p>
  
  <pre><code>@test = [1, 2, 3, 4]
  </code></pre>
  
  <p>Then I want to do:</p>
  
  <pre><code>@test[0] + @test[1] + @test[2] + @test[3]
  </code></pre>
  
  <p>Is there not a smarter, faster way of doing this? </p>