aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-05-31 23:53:36 -0500
committerJack Nagel2014-05-31 23:53:36 -0500
commit12442da0dbc5f49a0d39badf257b98c4b0f05a1e (patch)
treeca89017a730864f8048a3a2ed2a2316e6d55c1d8 /Library
parent81b1d640f1b1dcc73d25cc36b22235014a5f6c50 (diff)
downloadhomebrew-12442da0dbc5f49a0d39badf257b98c4b0f05a1e.tar.bz2
Prefer Dir.glob when iterating over the result
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/tap.rb2
-rw-r--r--Library/Homebrew/cmd/update.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/tap.rb b/Library/Homebrew/cmd/tap.rb
index 3084ea1ab..b090f25b7 100644
--- a/Library/Homebrew/cmd/tap.rb
+++ b/Library/Homebrew/cmd/tap.rb
@@ -71,7 +71,7 @@ module Homebrew extend self
def repair_taps
count = 0
# prune dead symlinks in Formula
- Dir["#{HOMEBREW_LIBRARY}/Formula/*.rb"].each do |fn|
+ Dir.glob("#{HOMEBREW_LIBRARY}/Formula/*.rb") do |fn|
if not File.exist? fn
File.delete fn
count += 1
diff --git a/Library/Homebrew/cmd/update.rb b/Library/Homebrew/cmd/update.rb
index 88804c6cf..66d99d5df 100644
--- a/Library/Homebrew/cmd/update.rb
+++ b/Library/Homebrew/cmd/update.rb
@@ -96,7 +96,7 @@ module Homebrew extend self
def rename_taps_dir_if_necessary
need_repair_taps = false
- Dir["#{HOMEBREW_LIBRARY}/Taps/*/"].each do |tapd|
+ Dir.glob("#{HOMEBREW_LIBRARY}/Taps/*/") do |tapd|
begin
tapd_basename = File.basename(tapd)