summaryrefslogtreecommitdiff
path: root/test/rubygems
diff options
context:
space:
mode:
authorTomas Volf <tomas.volf@showmax.com>2022-06-24 10:31:07 +0200
committergit <svn-admin@ruby-lang.org>2022-06-28 23:31:33 +0900
commit69337a65b2bd3e5bc0260f76221620e94248c8af (patch)
treee2c9e166ddba404137cb20afacac5306a71aebcb /test/rubygems
parentca85bd818ac6f10d2f50ae04de0e2a79476e8266 (diff)
[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
Diffstat (limited to 'test/rubygems')
-rw-r--r--test/rubygems/test_gem_package.rb4
1 files changed, 1 insertions, 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
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'