title: Cumulative array sum in Ruby
body: <p>What is the slickest, most Ruby-like way of calculating the cumulative sum of an array?</p>
  
  <p>Example:</p>
  
  <pre><code>[1,2,3,4].cumulative_sum
  </code></pre>
  
  <p>should return</p>
  
  <pre><code>[1,3,6,10]
  </code></pre>