summaryrefslogtreecommitdiff
path: root/test/drb/test_drb.rb
diff options
context:
space:
mode:
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 6764e913ca..ae8ba4252a 100644
--- a/test/drb/test_drb.rb
+++ b/test/drb/test_drb.rb
@@ -217,7 +217,7 @@ class TestDRbEval < Test::Unit::TestCase
@ext.stop_service
end
- def test_01_safe1_eval
+ def test_01_safe1_safe4_eval
assert_raises(SecurityError) do
@there.method_missing(:instance_eval, 'ENV.inspect')
end
@@ -235,6 +235,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