summaryrefslogtreecommitdiff
path: root/test/drb/ut_eval.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/ut_eval.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/ut_eval.rb')
-rw-r--r--test/drb/ut_eval.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/drb/ut_eval.rb b/test/drb/ut_eval.rb
index 6a81e17d05..4df963e7cd 100644
--- a/test/drb/ut_eval.rb
+++ b/test/drb/ut_eval.rb
@@ -2,6 +2,14 @@ require 'drb/drb'
require 'drb/extserv'
class EvalAttack
+ def initialize
+ @four = DRb::DRbServer.new('druby://localhost:0', self, {:safe_level => 4})
+ end
+
+ def four
+ DRbObject.new_with_uri(@four.uri)
+ end
+
def remote_class
DRbObject.new(self.class)
end
@@ -17,7 +25,7 @@ if __FILE__ == $0
$SAFE = 1
- DRb.start_service('druby://localhost:0', EvalAttack.new)
+ DRb.start_service('druby://localhost:0', EvalAttack.new, {:safe_level => 2})
es = DRb::ExtServ.new(ARGV.shift, ARGV.shift)
DRb.thread.join
end