From 7d463e360b9c4718b17378eb52783116a01b884b Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Mon, 11 Nov 2019 15:03:57 +0900 Subject: Merge RubyGems 3.1.0.pre3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix gem pristine not accounting for user installed gems. Pull request #2914 by Luis Sagastume. * Refactor keyword argument test for Ruby 2.7. Pull request #2947 by SHIBATA Hiroshi. * Fix errors at frozen Gem::Version. Pull request #2949 by Nobuyoshi Nakada. * Remove taint usage on Ruby 2.7+. Pull request #2951 by Jeremy Evans. * Check Manifest.txt is up to date. Pull request #2953 by David Rodríguez. * Clarify symlink conditionals in tests. Pull request #2962 by David Rodríguez. * Update command line parsing to work under ps. Pull request #2966 by David Rodríguez. * Properly test `Gem::Specifications.stub_for`. Pull request #2970 by David Rodríguez. * Fix Gem::LOADED_SPECS_MUTEX handling for recursive locking. Pull request #2985 by MSP-Greg. --- lib/rubygems/test_case.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/rubygems/test_case.rb') diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb index 14212b9213..5ecf2ab1d8 100644 --- a/lib/rubygems/test_case.rb +++ b/lib/rubygems/test_case.rb @@ -259,10 +259,10 @@ class Gem::TestCase < (defined?(Minitest::Test) ? Minitest::Test : MiniTest::Uni Gem::DefaultUserInteraction.ui = Gem::MockGemUi.new tmpdir = File.realpath Dir.tmpdir - tmpdir.untaint + tmpdir.tap(&Gem::UNTAINT) @tempdir = File.join(tmpdir, "test_rubygems_#{$$}") - @tempdir.untaint + @tempdir.tap(&Gem::UNTAINT) FileUtils.mkdir_p @tempdir @@ -274,7 +274,7 @@ class Gem::TestCase < (defined?(Minitest::Test) ? Minitest::Test : MiniTest::Uni # Short and long path name is specific to Windows filesystem. if win_platform? @tempdir = Dir[@tempdir][0] - @tempdir.untaint + @tempdir.tap(&Gem::UNTAINT) end @gemhome = File.join @tempdir, 'gemhome' @@ -295,7 +295,7 @@ class Gem::TestCase < (defined?(Minitest::Test) ? Minitest::Test : MiniTest::Uni $LOAD_PATH.map! do |s| expand_path = File.realpath(s) rescue File.expand_path(s) if expand_path != s - expand_path.untaint + expand_path.tap(&Gem::UNTAINT) if s.instance_variable_defined?(:@gem_prelude_index) expand_path.instance_variable_set(:@gem_prelude_index, expand_path) end @@ -527,7 +527,7 @@ class Gem::TestCase < (defined?(Minitest::Test) ? Minitest::Test : MiniTest::Uni end end - gem = File.join(@tempdir, File.basename(spec.cache_file)).untaint + gem = File.join(@tempdir, File.basename(spec.cache_file)).tap(&Gem::UNTAINT) end Gem::Installer.at(gem, options.merge({:wrappers => true})).install @@ -566,7 +566,7 @@ class Gem::TestCase < (defined?(Minitest::Test) ? Minitest::Test : MiniTest::Uni # Reads a Marshal file at +path+ def read_cache(path) - File.open path.dup.untaint, 'rb' do |io| + File.open path.dup.tap(&Gem::UNTAINT), 'rb' do |io| Marshal.load io.read end end -- cgit v1.2.3