From 8b9422f5023e300ef03a4f606dc9f747d07a700e Mon Sep 17 00:00:00 2001 From: seki Date: Mon, 8 Nov 2004 15:45:31 +0000 Subject: [PATCH] add DRb::ExtServManager#uri=. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ lib/drb/extservm.rb | 6 ++++-- test/drb/drbtest.rb | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4e4691a2dd..ba38fc7900 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Nov 9 00:36:26 2004 Masatoshi SEKI + + * lib/drb/extservm.rb: add DRb::ExtServManager#uri=. + [ruby-dev:24743] + Mon Nov 8 22:20:19 2004 Dave Thomas * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_class): diff --git a/lib/drb/extservm.rb b/lib/drb/extservm.rb index d29a0802a9..2715c5e9fe 100644 --- a/lib/drb/extservm.rb +++ b/lib/drb/extservm.rb @@ -25,8 +25,9 @@ module DRb @waiting = [] @queue = Queue.new @thread = invoke_thread + @uri = nil end - attr_reader :server + attr_accessor :uri def service(name) while true @@ -84,7 +85,8 @@ module DRb return if @servers.include?(name) @servers[name] = false end - Process.detach(Process.spawn("#{command} #{DRb.uri} #{name}")) + uri = @uri || DRb.uri + Process.detach(Process.spawn("#{command} #{uri} #{name}")) true end end diff --git a/test/drb/drbtest.rb b/test/drb/drbtest.rb index 13f879558f..a102f7e3bc 100644 --- a/test/drb/drbtest.rb +++ b/test/drb/drbtest.rb @@ -23,6 +23,7 @@ class DRbService add_service_command(nm) end @server = @@server = DRb::DRbServer.new(nil, @@manager, {}) + @@manager.uri = @@server.uri def self.manager @@manager end