From 90996e1997fd593cc14a14cd15e11a297361d780 Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Sun, 3 Mar 2024 18:55:32 -0800 Subject: [PATCH] git grep -lE '\(\&[A-Za-z._]+method\(:' | xargs gsed -i -E 's|\(\&([A-Za-z._]+)public_method\(:([a-z?_]+)\)\)| { \1\2(_1) }|g' --- Library/Homebrew/cask/pkg.rb | 2 +- Library/Homebrew/cli/parser.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/cask/pkg.rb b/Library/Homebrew/cask/pkg.rb index a71e0eb17b..49dcade6b0 100644 --- a/Library/Homebrew/cask/pkg.rb +++ b/Library/Homebrew/cask/pkg.rb @@ -90,7 +90,7 @@ module Cask .stdout .split("\n") .map { |path| root.join(path) } - .reject(&MacOS.public_method(:undeletable?)) + .reject { MacOS.undeletable?(_1) } end sig { returns(Pathname) } diff --git a/Library/Homebrew/cli/parser.rb b/Library/Homebrew/cli/parser.rb index ca51b66111..b79de366c2 100644 --- a/Library/Homebrew/cli/parser.rb +++ b/Library/Homebrew/cli/parser.rb @@ -679,7 +679,7 @@ module Homebrew class OptionConflictError < UsageError def initialize(args) - args_list = args.map(&Formatter.public_method(:option)) + args_list = args.map { Formatter.option(_1) } .join(" and ") super "Options #{args_list} are mutually exclusive." end