mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
suppress warning: SAFE=3 does no sandboxing
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
dfa892af43
commit
b7cbdcc5fd
1 changed files with 7 additions and 1 deletions
|
@ -360,7 +360,13 @@ class TestThread < Test::Unit::TestCase
|
||||||
|
|
||||||
def test_safe_level
|
def test_safe_level
|
||||||
ok = false
|
ok = false
|
||||||
t = Thread.new { $SAFE = 3; ok = true; sleep }
|
t = Thread.new do
|
||||||
|
EnvUtil.suppress_warning do
|
||||||
|
$SAFE = 3
|
||||||
|
end
|
||||||
|
ok = true
|
||||||
|
sleep
|
||||||
|
end
|
||||||
Thread.pass until ok
|
Thread.pass until ok
|
||||||
assert_equal(0, Thread.current.safe_level)
|
assert_equal(0, Thread.current.safe_level)
|
||||||
assert_equal(3, t.safe_level)
|
assert_equal(3, t.safe_level)
|
||||||
|
|
Loading…
Reference in a new issue