aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils.rb
diff options
context:
space:
mode:
authorMarkus Reiter2017-04-27 09:56:16 +0200
committerMarkus Reiter2017-04-30 21:11:27 +0200
commit314483f75c8893eb68073f5863e7784797d6ea2a (patch)
tree69a485913529f95a77449b6715e6cf9888aa919e /Library/Homebrew/utils.rb
parenta16746906d463ce9e4dc129bc5a76b81585ee1dd (diff)
downloadbrew-314483f75c8893eb68073f5863e7784797d6ea2a.tar.bz2
Remove `Array#to_path_s`.
Diffstat (limited to 'Library/Homebrew/utils.rb')
-rw-r--r--Library/Homebrew/utils.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index 972732ffe..2ac195cdb 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -190,10 +190,10 @@ module Homebrew
Gem::Specification.reset
# Add Gem binary directory and (if missing) Ruby binary directory to PATH.
- paths = ENV["PATH"].split(File::PATH_SEPARATOR)
- paths.unshift(RUBY_BIN) if which("ruby") != RUBY_PATH
- paths.unshift(Gem.bindir)
- ENV["PATH"] = paths.to_path_s
+ path = PATH.new(ENV["PATH"])
+ path.prepend(RUBY_BIN) if which("ruby") != RUBY_PATH
+ path.prepend(Gem.bindir)
+ ENV["PATH"] = path.validate
if Gem::Specification.find_all_by_name(name, version).empty?
ohai "Installing or updating '#{name}' gem"