Fix assignment of block as actual value and not expected

This commit is contained in:
Daniel Bovensiepen
2013-08-01 11:32:46 +08:00
parent 7f282429b0
commit d5eab236e7
+2 -2
View File
@@ -101,7 +101,7 @@ end
def assert_equal(arg1, arg2 = nil, arg3 = nil)
if block_given?
exp, act, msg = yield, arg1, arg2
exp, act, msg = arg1, yield, arg2
else
exp, act, msg = arg1, arg2, arg3
end
@@ -113,7 +113,7 @@ end
def assert_not_equal(arg1, arg2 = nil, arg3 = nil)
if block_given?
exp, act, msg = yield, arg1, arg2
exp, act, msg = arg1, yield, arg2
else
exp, act, msg = arg1, arg2, arg3
end