Ignore blocks to Test::Unit::Assertions#pend silently

Although `pend` in test-unit gem expects the block does not pass if it
is given, our `pend` should ignore the block silently as same as it
just skips the test with no message by default.  Add an unused
parameter, to suppress the warning for the block to be ignored.
This commit is contained in:
Nobuyoshi Nakada 2024-09-04 12:59:02 +09:00
parent a3e08718b4
commit e884d65094
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465
Notes: git 2024-09-04 06:47:09 +00:00

View File

@ -522,7 +522,7 @@ module Test
# Skips the current test. Gets listed at the end of the run but
# doesn't cause a failure exit code.
def pend msg = nil, bt = caller
def pend msg = nil, bt = caller, &_
msg ||= "Skipped, no message given"
@skip = true
raise Test::Unit::PendedError, msg, bt