summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2020-06-08 17:52:41 +0200
committerJean Boussier <jean.boussier@gmail.com>2020-06-08 18:21:27 +0200
commitef74fc01e2a4cab9f7e60b9d9e4fd28d4631a7e6 (patch)
tree725f25a8053ec647a7b77322a12c402af5c26177 /test
parentc3e5cfc6658a0dcac9abb021625116a09419d2bc (diff)
downloadpsych-ef74fc01e2a4cab9f7e60b9d9e4fd28d4631a7e6.zip
Fix anchor lookup with symbolized names
Diffstat (limited to 'test')
-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 1bc3dd1..08ffe58 100644
--- a/test/psych/test_merge_keys.rb
+++ b/test/psych/test_merge_keys.rb
@@ -17,6 +17,16 @@ map:
assert_equal hash, doc
end
+ def test_merge_key_with_bare_hash_symbolized_names
+ doc = Psych.load <<-eodoc, symbolize_names: true
+map:
+ <<:
+ hello: world
+ eodoc
+ hash = { map: { hello: "world" } }
+ assert_equal hash, doc
+ end
+
def test_roundtrip_with_chevron_key
h = {}
v = { 'a' => h, '<<' => h }