From c27ae8d91aadca0660070ee1eeae9598b1fe47ee Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 20 Jan 2026 23:00:08 +0900 Subject: [PATCH] [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 --- 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 57c3478193..5e340c580a 100644 --- a/test/psych/test_data.rb +++ b/test/psych/test_data.rb @@ -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 -