diff --git a/Library/Homebrew/cask/artifact/abstract_uninstall.rb b/Library/Homebrew/cask/artifact/abstract_uninstall.rb index 51505e70c9..c669999d15 100644 --- a/Library/Homebrew/cask/artifact/abstract_uninstall.rb +++ b/Library/Homebrew/cask/artifact/abstract_uninstall.rb @@ -127,7 +127,7 @@ module Cask .map { |line| line.chomp.split("\t") } .map { |pid, state, id| [pid.to_i, state.to_i, id] } .select do |(pid, _, id)| - pid.nonzero? && id.match?(/^#{Regexp.escape(bundle_id)}($|\.\d+)/) + pid.nonzero? && /^#{Regexp.escape(bundle_id)}($|\.\d+)/.match?(id) end end