[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
This commit is contained in:
Tomas Volf 2022-06-24 10:31:07 +02:00 committed by git
parent ca85bd818a
commit 69337a65b2

View File

@ -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'