diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-16 08:08:06 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-16 08:08:06 +0000 |
commit | 7619cb3d7dcc9920a72ff5f2bc5546a5971fbab4 (patch) | |
tree | 1fe1f557eadc8ce3bd7b180434153e6420a7436b /test/rubygems/test_gem_util.rb | |
parent | 7a453b157661561146ce84d821d6c5c18a5368df (diff) | |
download | ruby-7619cb3d7dcc9920a72ff5f2bc5546a5971fbab4.tar.gz |
Merge RubyGems 2.7.6 from upstream.
It fixed some security vulnerabilities.
http://blog.rubygems.org/2018/02/15/2.7.6-released.html
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_util.rb')
-rw-r--r-- | test/rubygems/test_gem_util.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/rubygems/test_gem_util.rb b/test/rubygems/test_gem_util.rb index 71a26c06ae..3b7887d931 100644 --- a/test/rubygems/test_gem_util.rb +++ b/test/rubygems/test_gem_util.rb @@ -42,8 +42,13 @@ class TestGemUtil < Gem::TestCase assert_equal File.join(@tempdir, 'd'), paths[0] assert_equal @tempdir, paths[1] - assert_equal File.realpath(Dir.tmpdir), paths[2] - assert_equal File.realpath("..", Dir.tmpdir), paths[3] + if File.respond_to?(:realpath) + assert_equal File.realpath(Dir.tmpdir), paths[2] + assert_equal File.realpath("..", Dir.tmpdir), paths[3] + elsif RUBY_PLATFORM !~ /darwin/ + assert_equal Dir.tmpdir, paths[2] + assert_equal '/', paths[3] + end ensure # restore default permissions, allow the directory to be removed FileUtils.chmod(0775, 'd/e') unless win_platform? |