话所 rubykoans 真是不错的锻炼 ruby 基础的习题集,下面是我在做 koans 的过程中出现的问题,请问这是什么原理?
hash = Hash.new([])
hash[:one] << "uno"
hash[:two] << "dos"
assert_equal ["uno", "dos"], hash[:one]
assert_equal ["uno", "dos"], hash[:two]
assert_equal ["uno", "dos"], hash[:three]