aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/commands.rb
diff options
context:
space:
mode:
authorXu Cheng2015-08-06 17:12:35 +0800
committerXu Cheng2015-08-06 22:33:46 +0800
commitae0e270727cdd38d0c8b4ed2062f944a8596c6ea (patch)
tree592b42002b0e5e848342f5f5186d2b33c660e2ef /Library/Homebrew/cmd/commands.rb
parent4e5227fd4efbebdceaee4c427aeb3e408e5fd339 (diff)
downloadbrew-ae0e270727cdd38d0c8b4ed2062f944a8596c6ea.tar.bz2
favor flat_map over map...flatten
Diffstat (limited to 'Library/Homebrew/cmd/commands.rb')
-rw-r--r--Library/Homebrew/cmd/commands.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/commands.rb b/Library/Homebrew/cmd/commands.rb
index 1d4022f8d..2bb18b3e0 100644
--- a/Library/Homebrew/cmd/commands.rb
+++ b/Library/Homebrew/cmd/commands.rb
@@ -26,7 +26,7 @@ module Homebrew
end
def external_commands
- paths.map { |p| Dir["#{p}/brew-*"] }.flatten.
+ paths.flat_map { |p| Dir["#{p}/brew-*"] }.
map { |f| File.basename(f, ".rb")[5..-1] }.
reject { |f| f =~ /\./ }
end