From e4cd0d72876bae43b9369c1305db52370db47215 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Fri, 18 Oct 2019 09:36:11 -0700 Subject: [PATCH] [ruby/fileutils] Remove use of untaint on Ruby 2.7 to avoid deprecation warnings https://github.com/ruby/fileutils/commit/5ac9a8a1f7 --- lib/fileutils.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/fileutils.rb b/lib/fileutils.rb index 8a1b8a826b..1140dd817b 100644 --- a/lib/fileutils.rb +++ b/lib/fileutils.rb @@ -1300,7 +1300,8 @@ module FileUtils .reject {|n| n == '.' or n == '..' } end - files.map {|n| Entry_.new(prefix(), join(rel(), n.untaint)) } + untaint = RUBY_VERSION < '2.7' + files.map {|n| Entry_.new(prefix(), join(rel(), untaint ? n.untaint : n)) } end def stat