diff options
author | Jeremy Evans <code@jeremyevans.net> | 2019-07-29 12:10:15 -0700 |
---|---|---|
committer | Jeremy Evans <code@jeremyevans.net> | 2019-07-29 12:10:15 -0700 |
commit | 6eab49a40abcc743ddffcd5fc7103acbea06b215 (patch) | |
tree | 2e4bbda2df7791cffc6763a30d78392e60513657 /test/ruby | |
parent | 177731aadf0d2b2fb293e221728252c73446235a (diff) | |
download | ruby-6eab49a40abcc743ddffcd5fc7103acbea06b215.tar.gz |
Revert "Do not always taint the result of File#path"
This reverts commit 1a759bfe5d554c22571d2e6e4e5998cf06a7b98f.
This fails on some operating systems.
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_file_exhaustive.rb | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb index a702ed55e7..98a894698d 100644 --- a/test/ruby/test_file_exhaustive.rb +++ b/test/ruby/test_file_exhaustive.rb @@ -187,22 +187,6 @@ class TestFileExhaustive < Test::Unit::TestCase end end - def test_path_taint - [regular_file, utf8_file].each do |file| - assert_equal(false, File.open(file) {|f| f.path}.tainted?) - assert_equal(true, File.open(file.dup.taint) {|f| f.path}.tainted?) - o = Object.new - class << o; self; end.class_eval do - define_method(:to_path) { file } - end - assert_equal(false, File.open(o) {|f| f.path}.tainted?) - class << o; self; end.class_eval do - define_method(:to_path) { file.dup.taint } - end - assert_equal(true, File.open(o) {|f| f.path}.tainted?) - end - end - def assert_integer(n) assert_kind_of(Integer, n) end |