From f840c592f0e61754a473a9d1faca91555f780496 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Fri, 17 Oct 2014 12:01:27 -0500 Subject: [PATCH] We don't need a Pathname just to stat the directory --- Library/Homebrew/formula_cellar_checks.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Library/Homebrew/formula_cellar_checks.rb b/Library/Homebrew/formula_cellar_checks.rb index da14f38e17..939b55b1cc 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