Hash.default
is used to set the default value returned when you query a key that doesn't exist. An entry in the collection is not created for you, just because queried it.
Also, the value you set default
to is an instance of an object (an Array in your case), so when this is returned, it can be manipulated.
a = {}
a.default = [] # set default to a new empty Array
a[8] << 9 # a[8] doesn't exist, so the Array instance is returned, and 9 appended to it
a.default # => [9]
a[9] # a[9] doesn't exist, so default is returned