summaryrefslogtreecommitdiff
path: root/lib/rubygems/core_ext
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-11-12 08:39:38 +0900
committerYusuke Endoh <mame@ruby-lang.org>2019-11-12 08:39:38 +0900
commit2407e8972561143b34970fb5d9095be32676c685 (patch)
tree37e41167ab2f90e5716a93370944b794083a6b0b /lib/rubygems/core_ext
parent9594f57f3df6c2538f96f018fa5f9a775ac7dde1 (diff)
Revert "Use untaint for File.symlink in kernel_require.rb"
This reverts commit d9978ce5d397866afae536db2aa708af3b7a4b2f. Untaint was tentatively restored due to test failures. But now, the failed tests have been removed, so we can revert the tentative fix.
Diffstat (limited to 'lib/rubygems/core_ext')
-rw-r--r--lib/rubygems/core_ext/kernel_require.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/rubygems/core_ext/kernel_require.rb b/lib/rubygems/core_ext/kernel_require.rb
index ae0254b..944bb93 100644
--- a/lib/rubygems/core_ext/kernel_require.rb
+++ b/lib/rubygems/core_ext/kernel_require.rb
@@ -41,10 +41,7 @@ module Kernel
resolved_path = begin
rp = nil
$LOAD_PATH[0...Gem.load_path_insert_index || -1].each do |lp|
- # TODO:
- # for test_require.rb of ruby core test suite
- # We should use Gem::UNTAINT after https://bugs.ruby-lang.org/issues/16131
- safe_lp = lp.dup.untaint
+ safe_lp = lp.dup.tap(&Gem::UNTAINT)
begin
if File.symlink? safe_lp # for backword compatibility
next