diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-01 01:52:26 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-01 01:52:26 +0000 |
commit | 44320c5b8d780a1572206735a88212faf9428f11 (patch) | |
tree | 33badfda3fb40eae5ce52c0e4882ae887f3df3cd /test/psych/test_psych.rb | |
parent | b4070513dde45474486955fbe1a3f3e5d787a342 (diff) | |
download | ruby-44320c5b8d780a1572206735a88212faf9428f11.tar.gz |
Merge psych-3.0.0.
See NEWS file for this update details.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/psych/test_psych.rb')
-rw-r--r-- | test/psych/test_psych.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/psych/test_psych.rb b/test/psych/test_psych.rb index ff5ffbafc6..82906f0af6 100644 --- a/test/psych/test_psych.rb +++ b/test/psych/test_psych.rb @@ -184,20 +184,20 @@ class TestPsych < Psych::TestCase end def test_symbolize_names - result = Psych.load(<<-eoyml) + yaml = <<-eoyml foo: bar: baz hoge: - fuga: piyo eoyml + + result = Psych.load(yaml) assert_equal result, { "foo" => { "bar" => "baz"}, "hoge" => [{ "fuga" => "piyo" }] } - result = Psych.load(<<-eoyml, symbolize_names: true) -foo: - bar: baz -hoge: - - fuga: piyo - eoyml + result = Psych.load(yaml, symbolize_names: true) + assert_equal result, { foo: { bar: "baz" }, hoge: [{ fuga: "piyo" }] } + + result = Psych.safe_load(yaml, symbolize_names: true) assert_equal result, { foo: { bar: "baz" }, hoge: [{ fuga: "piyo" }] } end end |