diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | lib/test/unit.rb | 4 |
2 files changed, 6 insertions, 2 deletions
@@ -1,3 +1,7 @@ +Sun Oct 19 00:15:03 2008 Tanaka Akira <akr@fsij.org> + + * lib/test/unit.rb (assert_nothing_thrown): don't intern. + Sat Oct 18 14:40:32 2008 Yukihiro Matsumoto <matz@ruby-lang.org> * 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") |