From ba748d9b045b74fc1b1aa0ebe7f79dcb4f1925b7 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 20 Jan 2026 23:00:08 +0900 Subject: [PATCH] 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 --- test/psych/test_data.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/psych/test_data.rb b/test/psych/test_data.rb index 57c34781..5e340c58 100644 --- a/test/psych/test_data.rb +++ b/test/psych/test_data.rb @@ -83,12 +83,11 @@ def test_members_must_be_identical # 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 -