As mentioned in this answer, Array.new(size, object) creates an array with size references to the same object.
hash = Hash.new
a = Array.new(2, hash)
a[0]['cat'] = 'feline'
a # => [{"cat"=>"feline"},{"cat"=>"feline"}]
a[1]['cat'] = 'Felix'
a # => [{"cat"=>"Felix"},{"cat"=>"Felix"}]
Why does Ruby do this, rather than doing a dup or clone of object?