summaryrefslogtreecommitdiff
path: root/test/lib/test/unit
diff options
context:
space:
mode:
Diffstat (limited to 'test/lib/test/unit')
-rw-r--r--test/lib/test/unit/assertions.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/lib/test/unit/assertions.rb b/test/lib/test/unit/assertions.rb
index 4ba13a81e0..727c54c9d5 100644
--- a/test/lib/test/unit/assertions.rb
+++ b/test/lib/test/unit/assertions.rb
@@ -223,8 +223,8 @@ module Test
ret = catch(tag) do
begin
yield(tag)
- rescue ArgumentError => e
- raise unless thrown = e.message[/\Auncaught throw (.+)\z/m, 1]
+ rescue UncaughtThrowError => e
+ thrown = e.tag
end
msg = message(msg) {
"Expected #{mu_pp(tag)} to have been thrown"\