diff options
author | Alexander Momchilov <[email protected]> | 2022-07-22 16:16:04 -0400 |
---|---|---|
committer | git <[email protected]> | 2022-08-09 01:33:34 +0900 |
commit | 9c13a6ce5ff1f83489d9df65a5c7745efe16c8a4 (patch) | |
tree | 2c4a80f1addbe2b8ba1538752bb844ca89d4b3e7 /test/psych | |
parent | 4b9cdf4e1cbb87c4f81edef472c586cd321e924e (diff) |
[ruby/psych] Raise specific error when an anchor isn't defined
https://github.com/ruby/psych/commit/98fbd5247a
Diffstat (limited to 'test/psych')
-rw-r--r-- | test/psych/test_hash.rb | 2 | ||||
-rw-r--r-- | test/psych/test_merge_keys.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/test/psych/test_hash.rb b/test/psych/test_hash.rb index 88b520ebfc..31eba8580b 100644 --- a/test/psych/test_hash.rb +++ b/test/psych/test_hash.rb @@ -124,7 +124,7 @@ module Psych end def test_raises_if_anchor_not_defined - assert_raise(Psych::BadAlias) do + assert_raise(Psych::AnchorNotDefined) do Psych.unsafe_load(<<~eoyml) --- foo: &foo diff --git a/test/psych/test_merge_keys.rb b/test/psych/test_merge_keys.rb index 8d2fceabf5..2f55a1ed8e 100644 --- a/test/psych/test_merge_keys.rb +++ b/test/psych/test_merge_keys.rb @@ -117,7 +117,7 @@ development: bar: << : *foo eoyml - exp = assert_raise(Psych::BadAlias) { Psych.load(yaml, aliases: true) } + exp = assert_raise(Psych::AnchorNotDefined) { Psych.load(yaml, aliases: true) } assert_match 'foo', exp.message end |