formula, cask: deprecate use of Enumerable methods e.g. each.
This commit is contained in:
parent
6661f5b14d
commit
a2a8ba0c11
@ -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
|
||||||
|
|
||||||
|
|||||||
@ -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)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user