title: How can I marshal a hash with arrays?
body: <p>What should I do to <strong>marshal an hash of arrays?</strong>
  The following code only prints <code>{}</code>.</p>
  
  <pre><code>s = Hash.new
  s.default = Array.new
  s[0] &lt;&lt; "Tigger"
  s[7] &lt;&lt; "Ruth"
  s[7] &lt;&lt; "Puuh"
  data = Marshal.dump(s)
  ls = Marshal.restore( data )
  p ls
  </code></pre>
  
  <p>If the hash doesn't contain an array it is restored properly.</p>