summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--lib/test/unit/assertions.rb2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a34dbbfe68..0c382992e8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Oct 22 13:59:50 2010 NARUSE, Yui <[email protected]>
+
+ * 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 <[email protected]>
* gc.c (gc_lazy_sweep): Variable declarations should be at
diff --git a/lib/test/unit/assertions.rb b/lib/test/unit/assertions.rb
index ab3dd83aaa..b9fc2bcf12 100644
--- a/lib/test/unit/assertions.rb
+++ b/lib/test/unit/assertions.rb
@@ -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