diff options
| author | Jack Nagel | 2014-02-21 00:43:58 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-02-21 00:46:03 -0500 |
| commit | d31bee2e5b533cd09840768086dcaa463b02342e (patch) | |
| tree | 60ebcb8c629f08eafa5563b191c73cfc6107872a /Library/Homebrew | |
| parent | da87bdc2e55f18fdc1b184f8e123711429167735 (diff) | |
| download | brew-d31bee2e5b533cd09840768086dcaa463b02342e.tar.bz2 | |
Avoid ancestors.include?, klass1 < klass2 is faster
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/formulary.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index 350854bba..189160d54 100644 --- a/Library/Homebrew/formulary.rb +++ b/Library/Homebrew/formulary.rb @@ -65,7 +65,7 @@ class Formulary end klass = Formulary.get_formula_class(name) - if (klass == Formula) || !klass.ancestors.include?(Formula) + if klass == Formula || !(klass < Formula) raise FormulaUnavailableError.new(name) end klass |
