From 666c077691a5521cb82254911f0abb9575cac9a1 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Mon, 8 Jun 2020 17:52:41 +0200 Subject: [ruby/psych] Fix anchor lookup with symbolized names https://github.com/ruby/psych/commit/ef74fc01e2 --- test/psych/test_merge_keys.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test') diff --git a/test/psych/test_merge_keys.rb b/test/psych/test_merge_keys.rb index 1bc3dd1cb6..08ffe58fa8 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 } -- cgit v1.2.3