Deal with Ruby 2.5 and Ruby 2.6 in a different way

上级 69d98f9a
......@@ -573,9 +573,15 @@ def test_log_with_status_with_quiet
end
private
if RUBY_VERSION < "2.7"
def action(*args, &block)
capture(:stdout) { generator.send(*args, &block) }
end
else
def action(*args, **kwargs, &block)
capture(:stdout) { generator.send(*args, **kwargs, &block) }
end
end
def assert_runs(commands, config = {}, &block)
config_matcher = ->(actual_config) do
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册