aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/test_case.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2019-11-11 15:03:57 +0900
committerSHIBATA Hiroshi <hsbt@ruby-lang.org>2019-11-11 16:59:49 +0900
commit7d463e360b9c4718b17378eb52783116a01b884b (patch)
treeee6951d298d76fcbf0c5e062712e54de56a3fa39 /lib/rubygems/test_case.rb
parent31416423809f64d4b5ea6b9651cced3179cc5ced (diff)
downloadruby-7d463e360b9c4718b17378eb52783116a01b884b.tar.gz
Merge RubyGems 3.1.0.pre3
* 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.
Diffstat (limited to 'lib/rubygems/test_case.rb')
-rw-r--r--lib/rubygems/test_case.rb12
1 files changed, 6 insertions, 6 deletions
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