summaryrefslogtreecommitdiff
path: root/test/psych/test_psych.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-01 01:52:26 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-01 01:52:26 +0000
commit44320c5b8d780a1572206735a88212faf9428f11 (patch)
tree33badfda3fb40eae5ce52c0e4882ae887f3df3cd /test/psych/test_psych.rb
parentb4070513dde45474486955fbe1a3f3e5d787a342 (diff)
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.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/psych/test_psych.rb b/test/psych/test_psych.rb
index ff5ffba..82906f0 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