aboutsummaryrefslogtreecommitdiffstats
path: root/test/drb
diff options
context:
space:
mode:
Diffstat (limited to 'test/drb')
-rw-r--r--test/drb/test_drb.rb8
-rw-r--r--test/drb/ut_safe1.rb1
2 files changed, 6 insertions, 3 deletions
diff --git a/test/drb/test_drb.rb b/test/drb/test_drb.rb
index a6b83d201c..468c97017d 100644
--- a/test/drb/test_drb.rb
+++ b/test/drb/test_drb.rb
@@ -233,12 +233,16 @@ class TestDRbEval < Test::Unit::TestCase
remote_class = four.remote_class
+ assert_equal(1, remote_class.class_eval('1'))
+
+ assert_equal(1, remote_class.module_eval('1'))
+
assert_raises(SecurityError) do
- remote_class.class_eval('ENV.inspect')
+ remote_class.class_eval('ENV = {}')
end
assert_raises(SecurityError) do
- remote_class.module_eval('ENV.inspect')
+ remote_class.module_eval('ENV = {}')
end
end
end
diff --git a/test/drb/ut_safe1.rb b/test/drb/ut_safe1.rb
index 3ff8b4d66f..4df8e1e5a1 100644
--- a/test/drb/ut_safe1.rb
+++ b/test/drb/ut_safe1.rb
@@ -8,7 +8,6 @@ if __FILE__ == $0
it
end
- $SAFE = 1
DRb.start_service('druby://localhost:0', [1, 2, 'III', 4, "five", 6],
{:safe_level => 1})
es = DRb::ExtServ.new(ARGV.shift, ARGV.shift)