Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def test_default_value
- hash1 = Hash.new
- hash1[:one] = 1
- assert_equal 1, hash1[:one]
- assert_equal nil, hash1[:two]
- hash2 = Hash.new("dos")
- hash2[:one] = 1
- assert_equal 1, hash2[:one]
- assert_equal nil, hash2[:two]
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement