title: Ruby Hash initialization (default value nil)
body: <p>I've been reading the Ruby docs, and looking at some other posts on the issue, but I am still wondering about this: </p>
  
  <pre><code>#counts each number in an array once
  array = [1,1,2,5,3,2,5,3,3,3]
  numbers = {}
  array.each { |num| numbers[num] += 1 }
  
  =&gt; in `block in mode': undefined method `+' for nil:NilClass (NoMethodError)
  </code></pre>
  
  <p>In the <a href="http://www.ruby-doc.org/core-2.0.0/Hash.html">Hash documentation</a> the default value for a <code>Hash</code> is <code>nil</code>, which is why I am getting this error I assume. Is there a better way to insert each key/(value += 1) into the numbers array?</p>