[前][次][番号順一覧][スレッド一覧]

ruby-changes:32150

From: naruse <ko1@a...>
Date: Mon, 16 Dec 2013 14:04:07 +0900 (JST)
Subject: [ruby-changes:32150] naruse:r44229 (trunk): suppress warning: SAFE=3 does no sandboxing

naruse	2013-12-16 14:03:56 +0900 (Mon, 16 Dec 2013)

  New Revision: 44229

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44229

  Log:
    suppress warning: SAFE=3 does no sandboxing

  Modified files:
    trunk/test/ruby/test_thread.rb
Index: test/ruby/test_thread.rb
===================================================================
--- test/ruby/test_thread.rb	(revision 44228)
+++ test/ruby/test_thread.rb	(revision 44229)
@@ -360,7 +360,13 @@ class TestThread < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_thread.rb#L360
 
   def test_safe_level
     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
     assert_equal(0, Thread.current.safe_level)
     assert_equal(3, t.safe_level)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]