From 2cb160dc460c4e44d1b92bf55922b45533bdaef4 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Wed, 31 Dec 2014 11:13:45 -0500 Subject: [PATCH] Stop rescuing NameError This clause originated in 4a36c56ac7b36904712aa472b9bd50ef1b0c80d3, attempting to catch NameErrors raised by const_defined? calls earlier in the method body. Those const_defined? calls have since been moved out of the body of the begin block. Stop rescuing NameError here, which will make true programming errors in formulae easier to debug. --- Library/Homebrew/formulary.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index 2af67644f0..37ca80b901 100644 --- a/Library/Homebrew/formulary.rb +++ b/Library/Homebrew/formulary.rb @@ -74,11 +74,7 @@ class Formulary STDERR.puts "#{$0} (#{self.class.name}): loading #{path}" if ARGV.debug? begin require(path) - rescue NoMethodError - # This is a programming error in an existing formula, and should not - # have a "no such formula" message. - raise - rescue LoadError, NameError => e + rescue LoadError => e raise FormulaUnavailableError, name, e.backtrace end end