From 558b9191c0c76d9807f339dae289a62ad7ed4ae8 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 15 Nov 2014 07:28:08 +0000 Subject: vm_eval.c: UncaughtThrowError * vm_eval.c (rb_throw_obj): throw UncaughtThrowError instead of ArgumentError. [Feature #10480] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/lib/test/unit/assertions.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/lib') 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"\ -- cgit v1.2.3