summaryrefslogtreecommitdiff
path: root/tool/lib/test/unit/core_assertions.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tool/lib/test/unit/core_assertions.rb')
-rw-r--r--tool/lib/test/unit/core_assertions.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/tool/lib/test/unit/core_assertions.rb b/tool/lib/test/unit/core_assertions.rb
index d17e3d725a..97b9b392f9 100644
--- a/tool/lib/test/unit/core_assertions.rb
+++ b/tool/lib/test/unit/core_assertions.rb
@@ -331,14 +331,13 @@ eom
end
# Run Ractor-related test without influencing the main test suite
- def assert_ractor(src, args: [], file: nil, line: nil, ignore_stderr: nil, **opt)
+ def assert_ractor(src, args: [], require: nil, file: nil, line: nil, ignore_stderr: nil, **opt)
return unless defined?(Ractor)
- if (req = opt.delete(:require))
- req = "require #{req.inspect}"
- end
+ require = "require #{require.inspect}" if require
+
assert_separately(args, file, line, <<~RUBY, ignore_stderr: ignore_stderr, **opt)
- #{req}
+ #{require}
previous_verbose = $VERBOSE
$VERBOSE = nil
Ractor.new {} # trigger initial warning