formula, cask: deprecate use of Enumerable methods e.g. each.

This commit is contained in:
Mike McQuaid 2022-02-22 09:14:20 +00:00
parent 6661f5b14d
commit a2a8ba0c11
No known key found for this signature in database
GPG Key ID: 3338A31AFDB1D829
2 changed files with 4 additions and 4 deletions

View File

@ -6,8 +6,8 @@ module Cask
extend Enumerable extend Enumerable
def self.each(&block) def self.each(&block)
# TODO: 3.4.0: odeprecated "`Enumerable` methods on `Cask::Cask`", odeprecated "`Enumerable` methods on `Cask::Cask`",
# "`Cask::Cask.all` (but avoid looping over all casks, it's slow and insecure)" "`Cask::Cask.all` (but avoid looping over all casks, it's slow and insecure)"
return to_enum unless block return to_enum unless block

View File

@ -5,8 +5,8 @@ class Formula
extend Enumerable extend Enumerable
def self.each(&_block) def self.each(&_block)
# TODO: 3.4.0: odeprecated "`Enumerable` methods on `Formula`", odeprecated "`Enumerable` methods on `Formula`",
# "`Formula.all` (but avoid looping over all formulae, it's slow and insecure)" "`Formula.all` (but avoid looping over all formulae, it's slow and insecure)"
files.each do |file| files.each do |file|
yield Formulary.factory(file) yield Formulary.factory(file)