From 69337a65b2bd3e5bc0260f76221620e94248c8af Mon Sep 17 00:00:00 2001 From: Tomas Volf Date: Fri, 24 Jun 2022 10:31:07 +0200 Subject: [rubygems/rubygems] Fix test_install_location_extra_slash on alpine Under POSIX behavior of leading // is implementation defined. Musl does preserve it in realpath, glibc does not. That means the test was failing when executed on alpine linux. Original issue #508 was about // in the path, not about leading ones. When executed in such environment, the test will still test what it should when the explicit mangling of the path is not done. Fixes #5652 https://github.com/rubygems/rubygems/commit/0fa7373bf6 --- test/rubygems/test_gem_package.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'test/rubygems/test_gem_package.rb') diff --git a/test/rubygems/test_gem_package.rb b/test/rubygems/test_gem_package.rb index 34660bdccd..e3dce87c95 100644 --- a/test/rubygems/test_gem_package.rb +++ b/test/rubygems/test_gem_package.rb @@ -737,9 +737,7 @@ class TestGemPackage < Gem::Package::TarTestCase file = 'foo//file.rb'.dup file.taint if RUBY_VERSION < '2.7' - destination = @destination.sub '/', '//' - - destination = package.install_location file, destination + destination = package.install_location file, @destination assert_equal File.join(@destination, 'foo', 'file.rb'), destination refute destination.tainted? if RUBY_VERSION < '2.7' -- cgit v1.2.3