From c090c64b4faa429c9f0f7c361e932e6b1a960a3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 14 Jul 2020 13:16:09 +0200 Subject: [PATCH] [rubygems/rubygems] Prefer the standard separator on Windows It seems like the most common case since it requires no tricks on our CI environment. Co-authored-by: MSP-Greg https://github.com/rubygems/rubygems/commit/751c475574 --- lib/rubygems/installer.rb | 2 +- test/rubygems/test_gem_installer.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index 33de7f2f7c..3882330b53 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb @@ -704,7 +704,7 @@ class Gem::Installer return if self.class.path_warning user_bin_dir = @bin_dir || Gem.bindir(gem_home) - user_bin_dir = user_bin_dir.tr(File::SEPARATOR, File::ALT_SEPARATOR) if + user_bin_dir = user_bin_dir.tr(File::ALT_SEPARATOR, File::SEPARATOR) if File::ALT_SEPARATOR path = ENV['PATH'] diff --git a/test/rubygems/test_gem_installer.rb b/test/rubygems/test_gem_installer.rb index 3cf49a7f8d..766a4ee8f2 100644 --- a/test/rubygems/test_gem_installer.rb +++ b/test/rubygems/test_gem_installer.rb @@ -196,7 +196,7 @@ gem 'other', version bin_dir = installer.bin_dir if Gem.win_platform? - bin_dir = bin_dir.downcase.gsub(File::SEPARATOR, File::ALT_SEPARATOR) + bin_dir = bin_dir.downcase end orig_PATH, ENV['PATH'] = @@ -239,7 +239,7 @@ gem 'other', version expected = installer.bin_dir if Gem.win_platform? - expected = expected.downcase.gsub(File::SEPARATOR, File::ALT_SEPARATOR) + expected = expected.downcase end assert_match expected, @ui.error