[rubygems/rubygems] Always join with a string

Gem.path_separator can also be a regexp...

https://github.com/rubygems/rubygems/commit/7e6e56a5f3
This commit is contained in:
Samuel Giddins 2023-02-21 13:06:35 -08:00 коммит произвёл git
Родитель 0ca3a095be
Коммит a17b1b19b1
2 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -56,7 +56,7 @@ to the same gem path as user-installed gems.
end
def execute
gem_paths = { "GEM_HOME" => Gem.paths.home, "GEM_PATH" => Gem.paths.path.join(Gem.path_separator), "GEM_SPEC_CACHE" => Gem.paths.spec_cache_dir }.compact
gem_paths = { "GEM_HOME" => Gem.paths.home, "GEM_PATH" => Gem.paths.path.join(File::PATH_SEPARATOR), "GEM_SPEC_CACHE" => Gem.paths.spec_cache_dir }.compact
check_executable
@ -144,7 +144,7 @@ to the same gem path as user-installed gems.
def set_gem_exec_install_paths
home = File.join(Gem.dir, "gem_exec")
ENV["GEM_PATH"] = ([home] + Gem.path).join(Gem.path_separator)
ENV["GEM_PATH"] = ([home] + Gem.path).join(File::PATH_SEPARATOR)
ENV["GEM_HOME"] = home
Gem.clear_paths
end

Просмотреть файл

@ -270,6 +270,7 @@ class TestGemCommandsExecCommand < Gem::TestCase
use_ui @ui do
util_set_arch "unknown-unknown"
invoke "a"
assert_empty @ui.error
assert_equal "Building native extensions. This could take a while...\na-2\nsometimes_used-2\nwith_platform-2\n", @ui.output
end