ruby-changes:62465
From: David <ko1@a...>
Date: Fri, 31 Jul 2020 21:08:30 +0900 (JST)
Subject: [ruby-changes:62465] c090c64b4f (master): [rubygems/rubygems] Prefer the standard separator on Windows
https://git.ruby-lang.org/ruby.git/commit/?id=c090c64b4f From c090c64b4faa429c9f0f7c361e932e6b1a960a3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...> Date: Tue, 14 Jul 2020 13:16:09 +0200 Subject: [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 <MSP-Greg@u...> https://github.com/rubygems/rubygems/commit/751c475574 diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index 33de7f2..3882330 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb @@ -704,7 +704,7 @@ class Gem::Installer https://github.com/ruby/ruby/blob/trunk/lib/rubygems/installer.rb#L704 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 3cf49a7..766a4ee 100644 --- a/test/rubygems/test_gem_installer.rb +++ b/test/rubygems/test_gem_installer.rb @@ -196,7 +196,7 @@ gem 'other', version https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_installer.rb#L196 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 https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_installer.rb#L239 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/