summaryrefslogtreecommitdiff
path: root/test/drb/test_drb.rb
diff options
context:
space:
mode:
authorseki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-13 15:13:54 +0000
committerseki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-13 15:13:54 +0000
commit2681be1eed16ad862b3dd2d1a317e154b80f1148 (patch)
treecf0aad4a3b460cb158507f93ca2c5c8d43aa73bc /test/drb/test_drb.rb
parent1a22e46d60bd43bd19a089bd52fe4ee36518fe2c (diff)
add safe_leve, default_safe_level ([druby-ja:120])
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/drb/test_drb.rb')
-rw-r--r--test/drb/test_drb.rb15
1 files changed, 14 insertions, 1 deletions
diff --git a/test/drb/test_drb.rb b/test/drb/test_drb.rb
index d86bce883ac..a6b83d201c7 100644
--- a/test/drb/test_drb.rb
+++ b/test/drb/test_drb.rb
@@ -209,7 +209,7 @@ class TestDRbEval < Test::Unit::TestCase
@ext.stop_service if @ext
end
- def test_01_safe1_eval
+ def test_01_safe1_safe4_eval
assert_raises(SecurityError) do
@there.method_missing(:instance_eval, 'ENV.inspect')
end
@@ -227,6 +227,19 @@ class TestDRbEval < Test::Unit::TestCase
assert_raises(SecurityError) do
remote_class.module_eval('ENV.inspect')
end
+
+ four = @there.four
+ assert_equal(1, four.method_missing(:send, :eval, '1'))
+
+ remote_class = four.remote_class
+
+ assert_raises(SecurityError) do
+ remote_class.class_eval('ENV.inspect')
+ end
+
+ assert_raises(SecurityError) do
+ remote_class.module_eval('ENV.inspect')
+ end
end
end