diff options
author | Jean Boussier <jean.boussier@gmail.com> | 2021-02-25 18:36:15 +0100 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-05-17 11:20:45 +0900 |
commit | a3ceed50b877e57554ec825d7fefe066c81ff0ee (patch) | |
tree | bc4cc66f9012bb1cc26efab792e820054813f644 /test/psych/test_psych.rb | |
parent | 830778db95c1dca5dfad591eae5176d3133bf7ee (diff) | |
download | ruby-a3ceed50b877e57554ec825d7fefe066c81ff0ee.tar.gz |
[ruby/psych] Fix symabolize_name with non-string keys
https://github.com/ruby/psych/commit/1c5c29e81f
Diffstat (limited to 'test/psych/test_psych.rb')
-rw-r--r-- | test/psych/test_psych.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/psych/test_psych.rb b/test/psych/test_psych.rb index 76a3627095..9eea4a0f21 100644 --- a/test/psych/test_psych.rb +++ b/test/psych/test_psych.rb @@ -371,17 +371,18 @@ class TestPsych < Psych::TestCase yaml = <<-eoyml foo: bar: baz + 1: 2 hoge: - fuga: piyo eoyml result = Psych.load(yaml) - assert_equal result, { "foo" => { "bar" => "baz"}, "hoge" => [{ "fuga" => "piyo" }] } + assert_equal result, { "foo" => { "bar" => "baz", 1 => 2 }, "hoge" => [{ "fuga" => "piyo" }] } result = Psych.load(yaml, symbolize_names: true) - assert_equal result, { foo: { bar: "baz" }, hoge: [{ fuga: "piyo" }] } + assert_equal result, { foo: { bar: "baz", 1 => 2 }, hoge: [{ fuga: "piyo" }] } result = Psych.safe_load(yaml, symbolize_names: true) - assert_equal result, { foo: { bar: "baz" }, hoge: [{ fuga: "piyo" }] } + assert_equal result, { foo: { bar: "baz", 1 => 2 }, hoge: [{ fuga: "piyo" }] } end end |