1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
akr 2008-10-21 11:13:28 +00:00
parent b6ef272d02
commit 04f674188e
2 changed files with 7 additions and 1 deletions

View file

@ -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.

View file

@ -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