I have the following examples:
a = Hash.new([])
a[2][1] = 10
a[2] # => [nil, 10]
a # => {}
Why is the default hash not modified? How are the keys not able to be found? Why can't I see or iterate over any keys, but can call them via their index?
I have the following examples:
a = Hash.new([])
a[2][1] = 10
a[2] # => [nil, 10]
a # => {}
Why is the default hash not modified? How are the keys not able to be found? Why can't I see or iterate over any keys, but can call them via their index?