summaryrefslogtreecommitdiff
path: root/test/yaml/test_hash.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/yaml/test_hash.rb')
-rw-r--r--test/yaml/test_hash.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/yaml/test_hash.rb b/test/yaml/test_hash.rb
index afcdcaca7b..18a7e2533a 100644
--- a/test/yaml/test_hash.rb
+++ b/test/yaml/test_hash.rb
@@ -14,5 +14,16 @@ module YAML
def test_dump
assert_equal @hash, YAML.load(YAML.dump(@hash))
end
+
+ def test_ref_append
+ hash = YAML.load(<<-eoyml)
+---
+foo: &foo
+ hello: world
+bar:
+ <<: *foo
+eoyml
+ assert_equal({"foo"=>{"hello"=>"world"}, "bar"=>{"hello"=>"world"}}, hash)
+ end
end
end