[前][次][番号順一覧][スレッド一覧]

ruby-changes:58521

From: Jeremy <ko1@a...>
Date: Thu, 31 Oct 2019 15:52:57 +0900 (JST)
Subject: [ruby-changes:58521] e4cd0d7287 (master): [ruby/fileutils] Remove use of untaint on Ruby 2.7 to avoid deprecation warnings

https://git.ruby-lang.org/ruby.git/commit/?id=e4cd0d7287

From e4cd0d72876bae43b9369c1305db52370db47215 Mon Sep 17 00:00:00 2001
From: Jeremy Evans <code@j...>
Date: Fri, 18 Oct 2019 09:36:11 -0700
Subject: [ruby/fileutils] Remove use of untaint on Ruby 2.7 to avoid
 deprecation warnings

https://github.com/ruby/fileutils/commit/5ac9a8a1f7

diff --git a/lib/fileutils.rb b/lib/fileutils.rb
index 8a1b8a8..1140dd8 100644
--- a/lib/fileutils.rb
+++ b/lib/fileutils.rb
@@ -1300,7 +1300,8 @@ module FileUtils https://github.com/ruby/ruby/blob/trunk/lib/fileutils.rb#L1300
            .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
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]