@daviddavis `Hash.new(Array.new)` won't work. It returns the newly created array but it is not assigned to the key.
```
irb(main):001:0> h = Hash.new(Array.new)
=> {}
irb(main):002:0> h[1] << 2
=> [2]
irb(main):003:0> h
=> {}
```
It has to be assigned in the default block
```
irb(main):004:0> h = Hash.new { |hash, key| hash[key] = [] }
=> {}
irb(main):005:0> h[1] << 2
=> [2]
irb(main):006:0> h
=> {1=>[2]}
```
Btw the following would also work, but I don't think it's nice
```
irb(main):007:0> h = Hash.new(Array.new)
=> {}
irb(main):008:0> h[1] += [2]
=> [2]
irb(main):009:0> h
=> {1=>[2]}
```