在创建了一些新的哈希值之后,我发现了这个Ruby怪异的东西......任何人都可以解释发生了什么吗?
irb(main):001:0> some_hash = Hash.new({})
=> {}
irb(main):002:0> some_hash[:foo][:bar] = :baz
=> :baz
irb(main):003:0> some_hash
=> {}
irb(main):004:0> some_hash.keys
=> []
irb(main):005:0> some_hash[:foo]
=> {:bar=>:baz}
irb(main):006:0> some_hash.size
=> 0
irb(main):007:0> some_hash[:some_completely_new_key]
=> {:bar=>:baz}