Ruby Multidimensional Array - Remove duplicate in first position, add number in second position
<p>For this array: </p>

<pre><code>items = [[60, 3], [60, 3], [276, 2], [276, 2], [48, 2], [207, 2], [46, 2],
 [60, 2], [280, 2], [207, 1], [48, 1], [112, 1], [60, 1], [207, 1], [112, 1],
 [276, 1], [48, 1], [276, 1], [48, 1], [276, 1], [276, 1], [278, 1], [46, 1],
 [48, 1], [279, 1], [207, 1]]
</code></pre>

<p>I want to combine common numbers in the first positions of each sub-array, and add the numbers in the second positions together.</p>

<p>For instance, you'll see the first four sub-arrays here are: <code>[60, 3], [60, 3], [276, 2], [276, 2]</code></p>

<p>This would become: <code>[60,6], [276,4]</code> and so on.</p>