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):
treat nil case. Please run test-all before commit such change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b3ee43bb6e
commit
e1d1571256
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Fri Oct 22 13:59:50 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/test/unit/assertions.rb (Test::Unit::Assertions#assert):
|
||||||
|
treat nil case. Please run test-all before commit such change.
|
||||||
|
|
||||||
Thu Oct 21 23:58:14 2010 Koichi Sasada <ko1@atdot.net>
|
Thu Oct 21 23:58:14 2010 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
* gc.c (gc_lazy_sweep): Variable declarations should be at
|
* gc.c (gc_lazy_sweep): Variable declarations should be at
|
||||||
|
|
|
@ -14,7 +14,7 @@ module Test
|
||||||
|
|
||||||
def assert(test, msg = UNASSIGNED)
|
def assert(test, msg = UNASSIGNED)
|
||||||
msg = nil if msg == UNASSIGNED
|
msg = nil if msg == UNASSIGNED
|
||||||
unless String === msg or Proc === msg then
|
unless String === msg or Proc === msg or msg.nil? then
|
||||||
bt = caller.reject { |s| s.rindex(MiniTest::MINI_DIR, 0) }
|
bt = caller.reject { |s| s.rindex(MiniTest::MINI_DIR, 0) }
|
||||||
raise ArgumentError, "assertion message must be String or Proc, but #{msg.class} was given.", bt
|
raise ArgumentError, "assertion message must be String or Proc, but #{msg.class} was given.", bt
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue