title: Need to make this more Ruby-like
body: <p>I'm new to Ruby and I seem to be comfortable using while loops. But I would like to simplify my code by possibly using the 'each' method. How would I do this for this particular block of code?</p>
  
  <pre><code>sum_array = []
  i = 0
  while i &lt; array.length - 1
      j = i + 1
      while j &lt; array.length
          sum = array[i] + array[j]
          if sum != 0
              sum_array &lt;&lt; sum
          end 
          j += 1
      end
      i += 1
  end
  </code></pre>