diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index 343037ebf5..cf676854dc 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb @@ -709,7 +709,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.gsub(File::SEPARATOR, File::ALT_SEPARATOR) if + user_bin_dir = user_bin_dir.tr(File::SEPARATOR, File::ALT_SEPARATOR) if File::ALT_SEPARATOR path = ENV['PATH']