mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 21:44:30 +02:00
* 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:
parent
3759dfa23e
commit
bbf440c90b
17 changed files with 23 additions and 100 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue