From 2b29c498faf9971ca66c0c7fb6bfd1b2a75f01d1 Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Mon, 7 Aug 2023 17:26:46 -0700 Subject: [PATCH] s/blk/block --- Library/Homebrew/formula.rb | 6 +++--- Library/Homebrew/utils/inreplace.rb | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 00b55f5a00..d88d01ec43 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -2559,11 +2559,11 @@ class Formula before: T.nilable(T.any(Pathname, Regexp, String)), after: T.nilable(T.any(Pathname, String, Symbol)), audit_result: T::Boolean, - blk: T.nilable(T.proc.params(s: StringInreplaceExtension).void), + block: T.nilable(T.proc.params(s: StringInreplaceExtension).void), ).void } - def inreplace(paths, before = nil, after = nil, audit_result = true, &blk) # rubocop:disable Style/OptionalBooleanParameter - Utils::Inreplace.inreplace(paths, before, after, audit_result: audit_result, &blk) + def inreplace(paths, before = nil, after = nil, audit_result = true, &block) # rubocop:disable Style/OptionalBooleanParameter + Utils::Inreplace.inreplace(paths, before, after, audit_result: audit_result, &block) 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 1cd7da37e9..76e7cca5e2 100644 --- a/Library/Homebrew/utils/inreplace.rb +++ b/Library/Homebrew/utils/inreplace.rb @@ -41,10 +41,10 @@ module Utils before: T.nilable(T.any(Pathname, Regexp, String)), after: T.nilable(T.any(Pathname, String, Symbol)), audit_result: T::Boolean, - blk: T.nilable(T.proc.params(s: StringInreplaceExtension).void), + block: T.nilable(T.proc.params(s: StringInreplaceExtension).void), ).void } - def self.inreplace(paths, before = nil, after = nil, audit_result: true, &blk) + def self.inreplace(paths, before = nil, after = nil, audit_result: true, &block) paths = Array(paths) after &&= after.to_s before = before.to_s if before.is_a?(Pathname) @@ -58,7 +58,7 @@ module Utils s = StringInreplaceExtension.new(str) if before.nil? && after.nil? - raise ArgumentError, "Must supply a block or before/after params" unless blk + raise ArgumentError, "Must supply a block or before/after params" unless block yield s else