1
0
Fork 0
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:
naruse 2010-10-22 05:10:40 +00:00
parent b3ee43bb6e
commit e1d1571256
2 changed files with 6 additions and 1 deletions

View file

@ -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>
* gc.c (gc_lazy_sweep): Variable declarations should be at

View file

@ -14,7 +14,7 @@ module Test
def assert(test, 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) }
raise ArgumentError, "assertion message must be String or Proc, but #{msg.class} was given.", bt
end