mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 12:14:51 +00:00
[ruby/psych] Remove excessive check of message
The order of "unexpected" and "missing" keyword argument errors at `Data#initialize` had not been defined strictly. [Bug #21844](https://bugs.ruby-lang.org/issues/21844) ruby/ruby#15910 https://github.com/ruby/psych/commit/ba748d9b04
This commit is contained in:
parent
2842e61c92
commit
c27ae8d91a
@ -83,12 +83,11 @@ module Psych
|
||||
|
||||
# completely different members
|
||||
TestData.send :remove_const, :D
|
||||
TestData.const_set :D, Data.define(:foo, :bar)
|
||||
TestData.const_set :D, Data.define(:a, :c)
|
||||
e = assert_raise(ArgumentError) { Psych.unsafe_load d }
|
||||
assert_equal 'unknown keywords: :a, :b', e.message
|
||||
assert_include e.message, 'keyword:'
|
||||
ensure
|
||||
TestData.send :remove_const, :D
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user