aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-10-17 12:01:27 -0500
committerJack Nagel2014-10-17 12:01:49 -0500
commitf840c592f0e61754a473a9d1faca91555f780496 (patch)
tree89a8e5dc675419700c60e06f88711ecc71a961d3 /Library
parentecc09cee7e828d154af8543e0461af933ab7ee05 (diff)
downloadbrew-f840c592f0e61754a473a9d1faca91555f780496.tar.bz2
We don't need a Pathname just to stat the directory
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula_cellar_checks.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/Library/Homebrew/formula_cellar_checks.rb b/Library/Homebrew/formula_cellar_checks.rb
index da14f38e1..939b55b1c 100644
--- a/Library/Homebrew/formula_cellar_checks.rb
+++ b/Library/Homebrew/formula_cellar_checks.rb
@@ -150,7 +150,6 @@ module FormulaCellarChecks
private
def relative_glob(dir, pattern)
- return [] unless Pathname.new(dir).directory?
- Dir.chdir(dir) { Dir[pattern] }
+ File.directory?(dir) ? Dir.chdir(dir) { Dir[pattern] } : []
end
end