summaryrefslogtreecommitdiff
path: root/test/psych/test_psych.rb
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@ruby-lang.org>2021-05-13 11:09:51 -0700
committerGitHub <noreply@github.com>2021-05-13 11:09:51 -0700
commit216f94fb9aacb0754f1dd2257b8d6a61b278a8b2 (patch)
treeb68566ef79055361bdcd2445f3773dcb07604697 /test/psych/test_psych.rb
parent4de7e9c879ae042d0c25d6ade6274d593c4cc5bb (diff)
parent0767227051dbddf1f949eef512c174deabf22891 (diff)
downloadpsych-216f94fb9aacb0754f1dd2257b8d6a61b278a8b2.zip
Merge pull request #487 from ruby/default-unsafe
Use Psych.safe_load by default
Diffstat (limited to 'test/psych/test_psych.rb')
-rw-r--r--test/psych/test_psych.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/test/psych/test_psych.rb b/test/psych/test_psych.rb
index 912bcb9..256ed91 100644
--- a/test/psych/test_psych.rb
+++ b/test/psych/test_psych.rb
@@ -78,10 +78,6 @@ class TestPsych < Psych::TestCase
assert_raise(Psych::SyntaxError) { Psych.parse("--- `") }
end
- def test_parse_with_fallback
- assert_equal 42, Psych.parse("", fallback: 42)
- end
-
def test_non_existing_class_on_deserialize
e = assert_raise(ArgumentError) do
Psych.unsafe_load("--- !ruby/object:NonExistent\nfoo: 1")
@@ -239,11 +235,11 @@ class TestPsych < Psych::TestCase
end
def test_load_with_fallback_for_nil
- assert_nil Psych.unsafe_load("--- null", "file", fallback: 42)
+ assert_nil Psych.unsafe_load("--- null", filename: "file", fallback: 42)
end
def test_load_with_fallback_for_false
- assert_equal false, Psych.unsafe_load("--- false", "file", fallback: 42)
+ assert_equal false, Psych.unsafe_load("--- false", filename: "file", fallback: 42)
end
def test_load_file