 <p><code>Enumerable#group_by</code> is a useful tool, but in this case it's not the best one.</p> <p>If we start with a Hash whose default value is <code>[0, 0]</code> we can do (almost) everything—look up the month (or get the default value of it's a new month) and add 1 to the appropriate index (<code>0</code> for false and <code>1</code> for true)—in a single step:</p> <pre><code>array = [["June", false], ["June", false], ["June", false], ["October", false]] hsh = Hash.new {|h,k| h[k] = [0,0] } array.each {|mo, bool| hsh[mo][bool ? 1 : 0] += 1 } p hsh.map(&amp;:flatten) # =&gt; [["June", 3, 0], ["October", 1, 0]] </code></pre>