aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-04-05 17:41:37 -0500
committerJack Nagel2014-04-05 17:41:37 -0500
commitdd6e8c7186235cc3e718e92d1b7dfc842e6c373a (patch)
treec1a7666d1201e8a0567ae0b7ef967f59358460c7 /Library
parent109fff1b0f64351e8cdb2c7fd4bb833ce6535c79 (diff)
downloadhomebrew-dd6e8c7186235cc3e718e92d1b7dfc842e6c373a.tar.bz2
Combine conditional branches that do the same thing
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formulary.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb
index c2f977c2e..34e40fa23 100644
--- a/Library/Homebrew/formulary.rb
+++ b/Library/Homebrew/formulary.rb
@@ -176,11 +176,9 @@ class Formulary
# name appears to be a tapped formula, so we don't munge it
# in order to provide a useful error message when require fails.
f = TapLoader.new(name_or_path)
- elsif name_or_path.include? "/"
+ elsif name_or_path.include?("/") || File.extname(name_or_path) == ".rb"
# If name was a path or mapped to a cached formula
f = FromPathLoader.new(name_or_path)
- elsif File.extname(name_or_path) == ".rb"
- f = FromPathLoader.new(name_or_path)
else
f = StandardLoader.new(name_or_path)
end