summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-14 19:14:13 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-14 19:14:13 +0000
commitf7b68ecfcfd10cbf0fc1b6f3393c6d26bd7e32cf (patch)
tree426b4a146c784ac130415b4757fd2209046263ac
parent8e385d677829388a2b3c1b2745fe817bf2506173 (diff)
assertions.rb: ignore nil message
* lib/test/unit/assertions.rb (assert): allow nil message and just ignore. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--lib/test/unit/assertions.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/test/unit/assertions.rb b/lib/test/unit/assertions.rb
index 6212384..ae10e0b 100644
--- a/lib/test/unit/assertions.rb
+++ b/lib/test/unit/assertions.rb
@@ -27,6 +27,8 @@ module Test
def assert(test, *msgs)
case msg = msgs.first
when String, Proc
+ when nil
+ msgs.shift
else
bt = caller.reject { |s| s.start_with?(MINI_DIR) }
raise ArgumentError, "assertion message must be String or Proc, but #{msg.class} was given.", bt