summaryrefslogtreecommitdiff
path: root/test/ruby/test_module.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_module.rb')
-rw-r--r--test/ruby/test_module.rb38
1 files changed, 0 insertions, 38 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb
index 816e5dc1ff..5574bf0567 100644
--- a/test/ruby/test_module.rb
+++ b/test/ruby/test_module.rb
@@ -760,13 +760,6 @@ class TestModule < Test::Unit::TestCase
end
def test_undef
- assert_raise(SecurityError) do
- Thread.new do
- $SAFE = 4
- Class.instance_eval { undef_method(:foo) }
- end.join
- end
-
c = Class.new
assert_raise(NameError) do
c.instance_eval { undef_method(:foo) }
@@ -861,19 +854,6 @@ class TestModule < Test::Unit::TestCase
assert_equal(true, c.private_method_defined?(:baz))
end
- def test_change_visibility_under_safe4
- c = Class.new
- c.class_eval do
- def foo; end
- end
- assert_raise(SecurityError) do
- Thread.new do
- $SAFE = 4
- c.class_eval { private :foo }
- end.join
- end
- end
-
def test_top_public_private
assert_in_out_err([], <<-INPUT, %w([:foo] [:bar]), [])
private
@@ -970,24 +950,6 @@ class TestModule < Test::Unit::TestCase
assert_equal(false, m.include?(m))
end
- def test_include_under_safe4
- m = Module.new
- c1 = Class.new
- assert_raise(SecurityError) do
- lambda {
- $SAFE = 4
- c1.instance_eval { include(m) }
- }.call
- end
- assert_nothing_raised do
- lambda {
- $SAFE = 4
- c2 = Class.new
- c2.instance_eval { include(m) }
- }.call
- end
- end
-
def test_send
a = AClass.new
assert_equal(:aClass, a.__send__(:aClass))