From a2a8ba0c11e8f964301cb8c95cab88ccdf699756 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 22 Feb 2022 09:14:20 +0000 Subject: [PATCH] formula, cask: deprecate use of Enumerable methods e.g. `each`. --- Library/Homebrew/compat/cask.rb | 4 ++-- Library/Homebrew/compat/formula.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/compat/cask.rb b/Library/Homebrew/compat/cask.rb index daec219d0e..36c7163a18 100644 --- a/Library/Homebrew/compat/cask.rb +++ b/Library/Homebrew/compat/cask.rb @@ -6,8 +6,8 @@ module Cask extend Enumerable def self.each(&block) - # TODO: 3.4.0: odeprecated "`Enumerable` methods on `Cask::Cask`", - # "`Cask::Cask.all` (but avoid looping over all casks, it's slow and insecure)" + odeprecated "`Enumerable` methods on `Cask::Cask`", + "`Cask::Cask.all` (but avoid looping over all casks, it's slow and insecure)" return to_enum unless block diff --git a/Library/Homebrew/compat/formula.rb b/Library/Homebrew/compat/formula.rb index 013759f55d..925351de4c 100644 --- a/Library/Homebrew/compat/formula.rb +++ b/Library/Homebrew/compat/formula.rb @@ -5,8 +5,8 @@ class Formula extend Enumerable def self.each(&_block) - # TODO: 3.4.0: odeprecated "`Enumerable` methods on `Formula`", - # "`Formula.all` (but avoid looping over all formulae, it's slow and insecure)" + odeprecated "`Enumerable` methods on `Formula`", + "`Formula.all` (but avoid looping over all formulae, it's slow and insecure)" files.each do |file| yield Formulary.factory(file)