Skip to content

Commit e221d04

Browse files
committed
Use to_path_s in install_gem_setup_path!.
1 parent 3e4fe27 commit e221d04

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Library/Homebrew/utils.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,10 @@ def install_gem_setup_path!(name, version = nil, executable = name)
190190
Gem::Specification.reset
191191

192192
# Add Gem binary directory and (if missing) Ruby binary directory to PATH.
193-
path = ENV["PATH"].split(File::PATH_SEPARATOR)
194-
path.unshift(RUBY_BIN) if which("ruby") != RUBY_PATH
195-
path.unshift(Gem.bindir)
196-
ENV["PATH"] = path.join(File::PATH_SEPARATOR)
193+
paths = ENV["PATH"].split(File::PATH_SEPARATOR)
194+
paths.unshift(RUBY_BIN) if which("ruby") != RUBY_PATH
195+
paths.unshift(Gem.bindir)
196+
ENV["PATH"] = paths.to_path_s
197197

198198
if Gem::Specification.find_all_by_name(name, version).empty?
199199
ohai "Installing or updating '#{name}' gem"

0 commit comments

Comments
 (0)