Original koan:
def test_default_value hash1 = Hash.new hash1[:one] = 1 assert_equal __, hash1[:one] assert_equal __, hash1[:two] hash2 = Hash.new("dos") hash2[:one] = 1 assert_equal __, hash2[:one] assert_equal __, hash2[:two] end
The error is not in koan, but in the completed statement:
assert_equal nil, hash2[:two]
... it should be
assert_equal "dos", hash2[:two]
source share