ruby-changes:17549
From: naruse <ko1@a...>
Date: Fri, 22 Oct 2010 14:10:51 +0900 (JST)
Subject: [ruby-changes:17549] Ruby:r29554 (trunk): * lib/test/unit/assertions.rb (Test::Unit::Assertions#assert):
naruse 2010-10-22 14:10:40 +0900 (Fri, 22 Oct 2010) New Revision: 29554 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=29554 Log: * lib/test/unit/assertions.rb (Test::Unit::Assertions#assert): treat nil case. Please run test-all before commit such change. Modified files: trunk/ChangeLog trunk/lib/test/unit/assertions.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 29553) +++ ChangeLog (revision 29554) @@ -1,3 +1,8 @@ +Fri Oct 22 13:59:50 2010 NARUSE, Yui <naruse@r...> + + * 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@a...> * gc.c (gc_lazy_sweep): Variable declarations should be at Index: lib/test/unit/assertions.rb =================================================================== --- lib/test/unit/assertions.rb (revision 29553) +++ lib/test/unit/assertions.rb (revision 29554) @@ -14,7 +14,7 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/