1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/fileutils] Remove use of untaint on Ruby 2.7 to avoid deprecation warnings

https://github.com/ruby/fileutils/commit/5ac9a8a1f7
This commit is contained in:
Jeremy Evans 2019-10-18 09:36:11 -07:00 committed by Hiroshi SHIBATA
parent 39281d5774
commit e4cd0d7287

View file

@ -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