aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2020-07-14 13:16:34 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-07-31 21:07:19 +0900
commit985309ac38c212de327e419ad4a7bcf9e7b28267 (patch)
treec6da2463749b7cde7c4ad6a2ff1faeeff1d07025 /lib/rubygems
parent04d3e0727a15367971678ff913402745cbaede5e (diff)
downloadruby-985309ac38c212de327e419ad4a7bcf9e7b28267.tar.gz
[rubygems/rubygems] Support PATH's using `File::ALT_SEPARATOR` in `Gem::Installer`
Co-authored-by: MSP-Greg <MSP-Greg@users.noreply.github.com> https://github.com/rubygems/rubygems/commit/710b969b60
Diffstat (limited to 'lib/rubygems')
-rw-r--r--lib/rubygems/installer.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
index c9d87c5617..0639672137 100644
--- a/lib/rubygems/installer.rb
+++ b/lib/rubygems/installer.rb
@@ -707,6 +707,8 @@ class Gem::Installer
user_bin_dir = user_bin_dir.tr(File::ALT_SEPARATOR, File::SEPARATOR) if File::ALT_SEPARATOR
path = ENV['PATH']
+ path = path.tr(File::ALT_SEPARATOR, File::SEPARATOR) if File::ALT_SEPARATOR
+
if Gem.win_platform?
path = path.downcase
user_bin_dir = user_bin_dir.downcase