summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-02-05 13:06:14 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-02-05 13:06:14 +0000
commite66eec9284c74312de747633cb048b5bd95d8bc5 (patch)
treed45ad930917bef7a3fc0f4c98b21b4800b9cbb53 /lib
parent476ba90835a78e03124d956a4f9424bdbb61ee3c (diff)
* lib/test/unit/assertions.rb (Test::Unit::Assertions#assert):
revert r30796. r30797 and r30798 are an alternative fix. [ruby-dev:43174] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/test/unit/assertions.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/test/unit/assertions.rb b/lib/test/unit/assertions.rb
index 9a646c0867..5a0c01a4fb 100644
--- a/lib/test/unit/assertions.rb
+++ b/lib/test/unit/assertions.rb
@@ -10,10 +10,13 @@ module Test
obj.pretty_inspect.chomp
end
- def assert(test, msg = nil)
+ UNASSIGNED = Object.new # :nodoc:
+
+ def assert(test, msg = UNASSIGNED)
case msg
- when String, Proc, NilClass
- # do nothing
+ when UNASSIGNED
+ msg = nil
+ when String, Proc
else
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