mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/test/unit/assertions.rb (Test::Unit::Assertions#assert):
keep the first trace. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8657912211
commit
9ad152e555
2 changed files with 5 additions and 2 deletions
|
@ -1,4 +1,7 @@
|
|||
Sat May 1 22:27:45 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Sat May 1 22:41:05 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/test/unit/assertions.rb (Test::Unit::Assertions#assert):
|
||||
keep the first trace.
|
||||
|
||||
* lib/test/unit/assertions.rb (Test::Unit::Assertions#assert):
|
||||
fixed filtering. [ruby-core:29908]
|
||||
|
|
|
@ -12,7 +12,7 @@ module Test
|
|||
|
||||
def assert(test, msg = (nomsg = true; nil))
|
||||
unless nomsg or msg.instance_of?(String) or msg.instance_of?(Proc) or
|
||||
(bt = caller).shift.rindex(MiniTest::MINI_DIR, 0)
|
||||
(bt = caller).first.rindex(MiniTest::MINI_DIR, 0)
|
||||
bt.delete_if {|s| s.rindex(MiniTest::MINI_DIR, 0)}
|
||||
raise ArgumentError, "assertion message must be String or Proc, but #{msg.class} was given.", bt
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue