title: Creating a Hash with values as arrays and default value as empty array
body: <p>I want to create a Hash in Ruby with default values as an empty array</p>
  
  <p>So, I coded</p>
  
  <pre><code>x = Hash.new([])
  </code></pre>
  
  <p>However, when I try to push a value into it</p>
  
  <pre><code>x[0].push(99)
  </code></pre>
  
  <p>All the keys get <code>99</code> pushed into that array. How do I resolve this?</p>