aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_file.rb
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2019-09-24 20:59:12 -0700
committerJeremy Evans <code@jeremyevans.net>2019-11-18 01:00:25 +0200
commitffd0820ab317542f8780aac475da590a4bdbc7a8 (patch)
tree6a5d774933c15fd2b9ea948bd3ae2fa587faaf82 /test/ruby/test_file.rb
parentc5c05460ac20abcbc0ed686eb4acf06da7a39a79 (diff)
downloadruby-ffd0820ab317542f8780aac475da590a4bdbc7a8.tar.gz
Deprecate taint/trust and related methods, and make the methods no-ops
This removes the related tests, and puts the related specs behind version guards. This affects all code in lib, including some libraries that may want to support older versions of Ruby.
Diffstat (limited to 'test/ruby/test_file.rb')
-rw-r--r--test/ruby/test_file.rb20
1 files changed, 0 insertions, 20 deletions
diff --git a/test/ruby/test_file.rb b/test/ruby/test_file.rb
index 5599040e1e..9153298fd0 100644
--- a/test/ruby/test_file.rb
+++ b/test/ruby/test_file.rb
@@ -287,26 +287,6 @@ class TestFile < Test::Unit::TestCase
}
end
- def test_realpath_taintedness
- Dir.mktmpdir('rubytest-realpath') {|tmpdir|
- dir = File.realpath(tmpdir).untaint
- File.write(File.join(dir, base = "test.file"), '')
- base.taint
- dir.taint
- assert_predicate(File.realpath(base, dir), :tainted?)
- base.untaint
- dir.taint
- assert_predicate(File.realpath(base, dir), :tainted?)
- base.taint
- dir.untaint
- assert_predicate(File.realpath(base, dir), :tainted?)
- base.untaint
- dir.untaint
- assert_predicate(File.realpath(base, dir), :tainted?)
- assert_predicate(Dir.chdir(dir) {File.realpath(base)}, :tainted?)
- }
- end
-
def test_realpath_special_symlink
IO.pipe do |r, w|
if File.pipe?(path = "/dev/fd/#{r.fileno}")