From 921753cf8463b48239783cb0825015ff578526b0 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Thu, 22 Feb 2024 23:52:46 +0000 Subject: [PATCH] Fix RuboCop `Performance/BindCall` offenses --- Library/.rubocop.yml | 2 -- Library/Homebrew/utils.rb | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Library/.rubocop.yml b/Library/.rubocop.yml index 67087e5db6..ef81867e2a 100644 --- a/Library/.rubocop.yml +++ b/Library/.rubocop.yml @@ -464,8 +464,6 @@ Style/WordArray: # TODO: Enable these cops once https://github.com/Homebrew/brew/pull/16337#issuecomment-1855668516 is done. Naming/BlockForwarding: Enabled: false -Performance/BindCall: - Enabled: false Style/ArgumentsForwarding: Enabled: false Style/HashSyntax: diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index b8366488b2..9d2fd24455 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -65,7 +65,7 @@ module Homebrew time = Time.now begin - method.bind(self).call(*args, &block) + method.bind_call(self, *args, &block) ensure $times[name] ||= 0 $times[name] += Time.now - time