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
commita2e15e432b66de1f59ab5cf6743975653cd79161 (patch)
tree792269c28ea0cbf9b9654062b169829ec1bc8e98 /Library
parent2d7d43b5830367d583ff5635753b1f68fcd04843 (diff)
downloadhomebrew-a2e15e432b66de1f59ab5cf6743975653cd79161.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