* include/ruby/ruby.h: $SAFE=3 is now obsolete.

* ext/socket/init.c, ext/socket/socket.c, ext/socket/tcpsocket.c
  ext/socket/udpsocket.c, gc.c, object.c, re.c, safe.c: removed code
  for $SAFE=3
* bootstraptest/test_method.rb, test/erb/test_erb.rb, test/ruby/test_dir.rb
  test/ruby/test_file.rb, test/ruby/test_method.rb, test/ruby/test_regexp.rb
  test/ruby/test_thread.rb: remove tests for $SAFE=3

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2015-06-17 05:29:51 +00:00
parent 3759dfa23e
commit bbf440c90b
17 changed files with 23 additions and 100 deletions

View file

@ -585,19 +585,6 @@ class TestRegexp < Test::Unit::TestCase
assert_equal(3, "foobarbaz\u3042".rindex(/b../n, 5))
end
def test_taint
m = Thread.new do
"foo"[/foo/]
$SAFE = 3
/foo/.match("foo")
end.value
assert_predicate(m, :tainted?)
assert_nothing_raised('[ruby-core:26137]') {
m = proc {$SAFE = 3; %r"#{ }"o}.call
}
assert_predicate(m, :tainted?)
end
def assert_regexp(re, ss, fs = [], msg = nil)
re = Regexp.new(re) unless re.is_a?(Regexp)
ss = [ss] unless ss.is_a?(Array)