title: Ruby method Array#<< not updating the array in hash
body: <p>Inspired by <a href="https://stackoverflow.com/questions/2552363/how-can-i-marshal-a-hash-with-arrays">How can I marshal a hash with arrays?</a> I wonder what's the reason that <code>Array#&lt;&lt;</code> won't work properly in the following code:</p>
  
  <pre><code>h = Hash.new{Array.new}
  #=&gt; {}
  h[0]
  #=&gt; []
  h[0] &lt;&lt; 'a'
  #=&gt; ["a"]
  h[0]
  #=&gt; [] # why?!
  h[0] += ['a']
  #=&gt; ["a"]
  h[0]
  #=&gt; ["a"] # as expected
  </code></pre>
  
  <p>Does it have to do with the fact that <code>&lt;&lt;</code> changes the array in-place, while <code>Array#+</code> creates a new instance?</p>