From a3ceed50b877e57554ec825d7fefe066c81ff0ee Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Thu, 25 Feb 2021 18:36:15 +0100 Subject: [ruby/psych] Fix symabolize_name with non-string keys https://github.com/ruby/psych/commit/1c5c29e81f --- test/psych/test_psych.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'test') 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 -- cgit v1.2.3