aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorJack Nagel2014-02-21 00:43:58 -0500
committerJack Nagel2014-02-21 00:46:03 -0500
commitd31bee2e5b533cd09840768086dcaa463b02342e (patch)
tree60ebcb8c629f08eafa5563b191c73cfc6107872a /Library/Homebrew
parentda87bdc2e55f18fdc1b184f8e123711429167735 (diff)
downloadbrew-d31bee2e5b533cd09840768086dcaa463b02342e.tar.bz2
Avoid ancestors.include?, klass1 < klass2 is faster
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/formulary.rb2
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