From 318334a081dbd0489ea9771a197070f57ac471b4 Mon Sep 17 00:00:00 2001 From: Herwin Date: Mon, 22 Dec 2025 07:31:49 +0100 Subject: [PATCH] Fix names of error in test descriptions of Kernel#raise This was probably a leftover of a copy-paste, these should check TypeError instead of ArgumentError. --- core/kernel/raise_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/kernel/raise_spec.rb b/core/kernel/raise_spec.rb index a4ab963fa3..fcd011d4e6 100644 --- a/core/kernel/raise_spec.rb +++ b/core/kernel/raise_spec.rb @@ -51,11 +51,11 @@ -> { raise(cause: nil) }.should raise_error(ArgumentError, "only cause is given with no arguments") end - it "raises an ArgumentError when given cause is not an instance of Exception" do + it "raises a TypeError when given cause is not an instance of Exception" do -> { raise "message", cause: Object.new }.should raise_error(TypeError, "exception object expected") end - it "doesn't raise an ArgumentError when given cause is nil" do + it "doesn't raise a TypeError when given cause is nil" do -> { raise "message", cause: nil }.should raise_error(RuntimeError, "message") end