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")