ruby-changes:72348
From: Tomas <ko1@a...>
Date: Tue, 28 Jun 2022 23:31:46 +0900 (JST)
Subject: [ruby-changes:72348] 69337a65b2 (master): [rubygems/rubygems] Fix test_install_location_extra_slash on alpine
https://git.ruby-lang.org/ruby.git/commit/?id=69337a65b2 From 69337a65b2bd3e5bc0260f76221620e94248c8af Mon Sep 17 00:00:00 2001 From: Tomas Volf <tomas.volf@s...> 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(-) 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 https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_package.rb#L737 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.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/