Merge pull request #12911 from Homebrew/deprecate_formula_each
formula, cask: deprecate use of Enumerable methods e.g. `each`.
This commit is contained in:
commit
2aecc2a604
@ -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
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user