diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 3ba036d11f..e97ebd9d52 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -2562,7 +2562,7 @@ class Formula ).void } def inreplace(paths, before = nil, after = nil, audit_result = true) # rubocop:disable Style/OptionalBooleanParameter - Utils::Inreplace.inreplace(paths, before, after, audit_result) + Utils::Inreplace.inreplace(paths, before, after, audit_result: audit_result) rescue Utils::Inreplace::Error => e onoe e.to_s raise BuildError.new(self, "inreplace", Array(paths), {}) diff --git a/Library/Homebrew/utils/inreplace.rb b/Library/Homebrew/utils/inreplace.rb index 4515bcfa23..9743c1608a 100644 --- a/Library/Homebrew/utils/inreplace.rb +++ b/Library/Homebrew/utils/inreplace.rb @@ -43,7 +43,7 @@ module Utils audit_result: T::Boolean, ).void } - def self.inreplace(paths, before = nil, after = nil, audit_result = true) # rubocop:disable Style/OptionalBooleanParameter + def self.inreplace(paths, before = nil, after = nil, audit_result: true) paths = Array(paths) after &&= after.to_s before = before.to_s if before.is_a?(Pathname)