Skip to content

Commit 17b2bde

Browse files
committed
Remove use of untaint on Ruby 2.7 to avoid deprecation warnings
1 parent ff35d69 commit 17b2bde

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/fileutils.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1300,7 +1300,8 @@ def entries
13001300
.reject {|n| n == '.' or n == '..' }
13011301
end
13021302

1303-
files.map {|n| Entry_.new(prefix(), join(rel(), n.untaint)) }
1303+
untaint = RUBY_VERSION >= '2.7'
1304+
files.map {|n| Entry_.new(prefix(), join(rel(), untaint ? n.untaint : n)) }
13041305
end
13051306

13061307
def stat

0 commit comments

Comments
 (0)