aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorJack Nagel2014-05-30 12:38:30 -0500
committerJack Nagel2014-05-30 12:41:12 -0500
commit2d2f22813d682a69a542640df95eaf36110290df (patch)
tree48a95aa7768422a2bb067ac86ee5e06b6dd8cd8d /Library/Formula
parenta3a4b4290910d9db67330d92d9b182bd32cc1fbf (diff)
downloadhomebrew-2d2f22813d682a69a542640df95eaf36110290df.tar.bz2
Prefer Dir[] to Dir.glob when not passing a block
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/boost.rb2
-rw-r--r--Library/Formula/geoip.rb2
-rw-r--r--Library/Formula/python3.rb4
3 files changed, 3 insertions, 5 deletions
diff --git a/Library/Formula/boost.rb b/Library/Formula/boost.rb
index ecd9539f5..7b11e5210 100644
--- a/Library/Formula/boost.rb
+++ b/Library/Formula/boost.rb
@@ -172,7 +172,7 @@ class Boost < Formula
s = ''
# ENV.compiler doesn't exist in caveats. Check library availability
# instead.
- if Dir.glob("#{lib}/libboost_log*").empty?
+ if Dir["#{lib}/libboost_log*"].empty?
s += <<-EOS.undent
Building of Boost.Log is disabled because it requires newer GCC or Clang.
diff --git a/Library/Formula/geoip.rb b/Library/Formula/geoip.rb
index 77ab30bb6..c3db62e56 100644
--- a/Library/Formula/geoip.rb
+++ b/Library/Formula/geoip.rb
@@ -52,7 +52,7 @@ class Geoip < Formula
# Since default data directory moved, copy existing DBs
legacy_data = Pathname.new "#{HOMEBREW_PREFIX}/share/GeoIP"
- cp Dir.glob("#{legacy_data}/*"), geoip_data if legacy_data.exist?
+ cp Dir["#{legacy_data}/*"], geoip_data if legacy_data.exist?
["City", "Country"].each do |type|
full = Pathname.new "#{geoip_data}/GeoIP#{type}.dat"
diff --git a/Library/Formula/python3.rb b/Library/Formula/python3.rb
index 5166c6d10..96162e3b0 100644
--- a/Library/Formula/python3.rb
+++ b/Library/Formula/python3.rb
@@ -111,9 +111,7 @@ class Python3 < Formula
system "make", "quicktest" if build.include? "quicktest"
# Any .app get a " 3" attached, so it does not conflict with python 2.x.
- Dir.glob(prefix/"*.app").each do |app|
- mv app, app.gsub(".app", " 3.app")
- end
+ Dir.glob("#{prefix}/*.app") { |app| mv app, app.sub(".app", " 3.app") }
# A fix, because python and python3 both want to install Python.framework
# and therefore we can't link both into HOMEBREW_PREFIX/Frameworks