aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 3f5f83ced..cb78221fd 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -395,6 +395,8 @@ class Formula
raise LoadError
end
+ raise NameError if klass.superclass != Formula
+
return klass.new(name) if install_type == :from_name
return klass.new(name, path.to_s)
rescue NoMethodError