97550b18cc
Backport upstream patch for ruby32 regex issue with hash character
25 lines
384 B
Ruby
25 lines
384 B
Ruby
module Minitest
|
|
module Assertions
|
|
|
|
alias_method :assert_orig, :assert
|
|
alias_method :refute_orig, :refute
|
|
|
|
def assert(test = nil, msg = nil, &block)
|
|
if block_given?
|
|
assert_orig yield
|
|
else
|
|
assert_orig test, msg
|
|
end
|
|
end
|
|
|
|
def refute(test = nil, msg = nil, &block)
|
|
if block_given?
|
|
refute_orig yield
|
|
else
|
|
refute_orig test, msg
|
|
end
|
|
end
|
|
|
|
end
|
|
end
|