diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-21 12:33:44 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-21 12:33:44 +0000 |
commit | ac466de7ff7bb62f86e2252d479d9db8c1f98500 (patch) | |
tree | c3430184974505052ead450a5b7d4eb8135a0534 | |
parent | 04f674188e423a5af7af51c074d5f531be537e1b (diff) | |
download | ruby-ac466de7ff7bb62f86e2252d479d9db8c1f98500.tar.gz |
* lib/test/unit.rb (assert_nothing_raised): raise with backtrace.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | lib/test/unit.rb | 4 |
2 files changed, 5 insertions, 3 deletions
@@ -1,3 +1,7 @@ +Tue Oct 21 21:33:36 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * lib/test/unit.rb (assert_nothing_raised): raise with backtrace. + Tue Oct 21 20:12:19 2008 Tanaka Akira <akr@fsij.org> * lib/test/unit.rb (assert_nothing_raised): set backtrace. diff --git a/lib/test/unit.rb b/lib/test/unit.rb index 57ae020b25..c4c3724cd0 100644 --- a/lib/test/unit.rb +++ b/lib/test/unit.rb @@ -82,9 +82,7 @@ module Test if ((args.empty? && !e.instance_of?(MiniTest::Assertion)) || args.any? {|a| a.instance_of?(Module) ? e.is_a?(a) : e.class == a }) msg = message(msg) { "Exception raised:\n<#{mu_pp(e)}>" } - exc = MiniTest::Assertion.new(msg.call) - exc.set_backtrace(e.backtrace) - raise exc + raise MiniTest::Assertion, msg.call, e.backtrace else raise end |