diff options
Diffstat (limited to 'test/drb/test_drb.rb')
-rw-r--r-- | test/drb/test_drb.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/test/drb/test_drb.rb b/test/drb/test_drb.rb index d86bce883a..a6b83d201c 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 |