From d066b9e01ccb2260fac8b2580c10e73335c7c7db Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Thu, 5 Feb 2026 20:38:00 +0100 Subject: Refactor type error to be more consistent [Bug #21864] Co-Authored-By: Benoit Daloze --- spec/ruby/shared/types/rb_num2dbl_fails.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'spec/ruby/shared/types') diff --git a/spec/ruby/shared/types/rb_num2dbl_fails.rb b/spec/ruby/shared/types/rb_num2dbl_fails.rb index ec7cc11986..4d4856fa6c 100644 --- a/spec/ruby/shared/types/rb_num2dbl_fails.rb +++ b/spec/ruby/shared/types/rb_num2dbl_fails.rb @@ -7,11 +7,11 @@ describe :rb_num2dbl_fails, shared: true do it "fails if string is provided" do - -> { @object.call("123") }.should raise_error(TypeError, "no implicit conversion to float from string") + -> { @object.call("123") }.should raise_consistent_error(TypeError, "no implicit conversion of String into Float") end it "fails if boolean is provided" do - -> { @object.call(true) }.should raise_error(TypeError, "no implicit conversion to float from true") - -> { @object.call(false) }.should raise_error(TypeError, "no implicit conversion to float from false") + -> { @object.call(true) }.should raise_consistent_error(TypeError, "no implicit conversion of true into Float") + -> { @object.call(false) }.should raise_consistent_error(TypeError, "no implicit conversion of false into Float") end end -- cgit v1.2.3