aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_env.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_env.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_env.rb')
-rw-r--r--test/ruby/test_env.rb7
1 files changed, 0 insertions, 7 deletions
diff --git a/test/ruby/test_env.rb b/test/ruby/test_env.rb
index b01c3b12ee..d9301ff76c 100644
--- a/test/ruby/test_env.rb
+++ b/test/ruby/test_env.rb
@@ -46,7 +46,6 @@ class TestEnv < Test::Unit::TestCase
end
ENV['TEST'] = 'bar'
assert_equal('bar', ENV['TEST'])
- assert_predicate(ENV['TEST'], :tainted?)
if IGNORE_CASE
assert_equal('bar', ENV['test'])
else
@@ -113,7 +112,6 @@ class TestEnv < Test::Unit::TestCase
assert_invalid_env {|v| ENV[v]}
ENV[PATH_ENV] = ""
assert_equal("", ENV[PATH_ENV])
- assert_predicate(ENV[PATH_ENV], :tainted?)
assert_nil(ENV[""])
end
@@ -136,7 +134,6 @@ class TestEnv < Test::Unit::TestCase
assert_nothing_raised { ENV.fetch(PATH_ENV, "foo") }
ENV[PATH_ENV] = ""
assert_equal("", ENV.fetch(PATH_ENV))
- assert_predicate(ENV.fetch(PATH_ENV), :tainted?)
end
def test_aset
@@ -154,9 +151,6 @@ class TestEnv < Test::Unit::TestCase
assert_equal("test", ENV["foo"])
rescue Errno::EINVAL
end
-
- ENV[PATH_ENV] = "/tmp/".taint
- assert_equal("/tmp/", ENV[PATH_ENV])
end
def test_keys
@@ -364,7 +358,6 @@ class TestEnv < Test::Unit::TestCase
assert_equal("foo", v)
end
assert_invalid_env {|var| ENV.assoc(var)}
- assert_predicate(v, :tainted?)
assert_equal(Encoding.find("locale"), v.encoding)
end