From 5cf4f78aea2a136ab28005c7893351c7e96139b6 Mon Sep 17 00:00:00 2001 From: akr Date: Sat, 18 Oct 2008 15:15:57 +0000 Subject: [PATCH] * lib/test/unit.rb (assert_nothing_thrown): don't intern. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ lib/test/unit.rb | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7f57591708..0ebb753c64 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sun Oct 19 00:15:03 2008 Tanaka Akira + + * lib/test/unit.rb (assert_nothing_thrown): don't intern. + Sat Oct 18 14:40:32 2008 Yukihiro Matsumoto * numeric.c (num_sadded): remove newly defined singleton method diff --git a/lib/test/unit.rb b/lib/test/unit.rb index 9c15806963..b96676679d 100644 --- a/lib/test/unit.rb +++ b/lib/test/unit.rb @@ -92,8 +92,8 @@ module Test begin yield rescue ArgumentError => error - raise error if /^uncaught throw (.+)$/ !~ error.message - msg = message(msg) { "<#{$1.intern}> was thrown when nothing was expected" } + raise error if /\Auncaught throw (.+)\z/m !~ error.message + msg = message(msg) { "<#{$1}> was thrown when nothing was expected" } flunk(msg) end assert(true, "Expected nothing to be thrown")