diff options
author | Jean Boussier <jean.boussier@gmail.com> | 2020-06-08 17:52:41 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-06-23 15:26:29 +0900 |
commit | 666c077691a5521cb82254911f0abb9575cac9a1 (patch) | |
tree | 93c714a941c35584cfa081a117b2be2b47f413ec /test | |
parent | e9adc2f4208797cb506f67c3e2fdc7966a6748e5 (diff) | |
download | ruby-666c077691a5521cb82254911f0abb9575cac9a1.tar.gz |
[ruby/psych] Fix anchor lookup with symbolized names
https://github.com/ruby/psych/commit/ef74fc01e2
Diffstat (limited to 'test')
-rw-r--r-- | test/psych/test_merge_keys.rb | 10 |
1 files changed, 10 insertions, 0 deletions
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 } |