summaryrefslogtreecommitdiff
path: root/tool/lib/test
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2024-09-04 12:59:02 +0900
committerNobuyoshi Nakada <[email protected]>2024-09-04 14:49:25 +0900
commite884d65094e7b10b3e4c2764c83ed68db67666ab (patch)
tree80a629e9c77e07a6863e0d4bc8dcf05882262039 /tool/lib/test
parenta3e08718b4c6505564b6a36933477a6093a38c77 (diff)
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.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/11538
Diffstat (limited to 'tool/lib/test')
-rw-r--r--tool/lib/test/unit/assertions.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/lib/test/unit/assertions.rb b/tool/lib/test/unit/assertions.rb
index aad422f7e7..fe3351107e 100644
--- a/tool/lib/test/unit/assertions.rb
+++ b/tool/lib/test/unit/assertions.rb
@@ -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