diff --git a/Library/Homebrew/test/cask/artifact/shared_examples/uninstall_zap.rb b/Library/Homebrew/test/cask/artifact/shared_examples/uninstall_zap.rb index 892785f3e885b..b5813809b7de6 100644 --- a/Library/Homebrew/test/cask/artifact/shared_examples/uninstall_zap.rb +++ b/Library/Homebrew/test/cask/artifact/shared_examples/uninstall_zap.rb @@ -314,8 +314,8 @@ before do allow_any_instance_of(Cask::Artifact::AbstractUninstall).to receive(:trash_paths) - .and_wrap_original do |method, *args| - method.call(*args).tap do |trashed, _| + .and_wrap_original do |method, *args, **kwargs| + method.call(*args, **kwargs).tap do |trashed, _| FileUtils.rm_r trashed end end