From ec620e0984ce3159dc4c2fc8626982be3cfaca2a Mon Sep 17 00:00:00 2001 From: Vipul A M Date: Mon, 14 Oct 2013 21:52:25 +0530 Subject: `$SAFE = 4;` has been removed with Ruby 2.1 For background - https://bugs.ruby-lang.org/issues/8468 Changset - https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/41259/diff/test/ruby/test_thread.rb --- activesupport/test/core_ext/thread_test.rb | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/activesupport/test/core_ext/thread_test.rb b/activesupport/test/core_ext/thread_test.rb index 54d2dcd8dd..6a7c6e0604 100644 --- a/activesupport/test/core_ext/thread_test.rb +++ b/activesupport/test/core_ext/thread_test.rb @@ -72,17 +72,4 @@ class ThreadExt < ActiveSupport::TestCase end end - def test_thread_variable_security - rubinius_skip "$SAFE is not supported on Rubinius." - - t = Thread.new { sleep } - - assert_raises(SecurityError) do - Thread.new { $SAFE = 4; t.thread_variable_get(:foo) }.join - end - - assert_raises(SecurityError) do - Thread.new { $SAFE = 4; t.thread_variable_set(:foo, :baz) }.join - end - end end -- cgit v1.2.3