summaryrefslogtreecommitdiff
path: root/test/psych
diff options
context:
space:
mode:
Diffstat (limited to 'test/psych')
-rw-r--r--test/psych/test_merge_keys.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/psych/test_merge_keys.rb b/test/psych/test_merge_keys.rb
index 8b263e5186..1620a6a4e3 100644
--- a/test/psych/test_merge_keys.rb
+++ b/test/psych/test_merge_keys.rb
@@ -6,6 +6,16 @@ module Psych
attr_reader :bar
end
+ def test_merge_key_with_bare_hash
+ doc = Psych.load <<-eodoc
+map:
+ <<:
+ hello: world
+ eodoc
+ hash = { "map" => { "hello" => "world" } }
+ assert_equal hash, doc
+ end
+
def test_roundtrip_with_chevron_key
h = {}
v = { 'a' => h, '<<' => h }