From 7e268670ed4e2dec9a83cb8a79295135fb1c2110 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sun, 6 Jul 2014 11:16:10 -0500 Subject: [PATCH] Just use each since we're returning from inside the block --- Library/Homebrew/utils.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 9a73bf8295..0bbf8a7956 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -183,7 +183,7 @@ def puts_columns items, star_items=[] end def which cmd, path=ENV['PATH'] - path.split(File::PATH_SEPARATOR).find do |p| + path.split(File::PATH_SEPARATOR).each do |p| pcmd = File.expand_path(File.join(p, cmd)) return Pathname.new(pcmd) if File.executable?(pcmd) && !File.directory?(pcmd) end