aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-21 11:13:28 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-21 11:13:28 +0000
commit04f674188e423a5af7af51c074d5f531be537e1b (patch)
tree44f0351fce4d1c8a59acda993ef3630d0733f21b
parentb6ef272d025387e6707088ba2f9cef3b9031d2db (diff)
downloadruby-04f674188e423a5af7af51c074d5f531be537e1b.tar.gz
* lib/test/unit.rb (assert_nothing_raised): set backtrace.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--lib/test/unit.rb4
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 99f497b76e..e59564998b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue Oct 21 20:12:19 2008 Tanaka Akira <akr@fsij.org>
+
+ * lib/test/unit.rb (assert_nothing_raised): set backtrace.
+
Tue Oct 21 18:17:42 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* ext/zlib/zlib.c: remove obsolete prototype macros.
diff --git a/lib/test/unit.rb b/lib/test/unit.rb
index 0674ad4bfb..57ae020b25 100644
--- a/lib/test/unit.rb
+++ b/lib/test/unit.rb
@@ -82,7 +82,9 @@ 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)}>" }
- assert(false, msg)
+ exc = MiniTest::Assertion.new(msg.call)
+ exc.set_backtrace(e.backtrace)
+ raise exc
else
raise
end