summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorseki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-08 15:45:31 +0000
committerseki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-08 15:45:31 +0000
commitb5b554505085d7bccd0af6486bb37d668546cca3 (patch)
treee978bca25a7b5f17797cebc646308fed4d8f6e13
parent8e6af559baa406a465a4d30c6af75624567129a5 (diff)
downloadruby-b5b554505085d7bccd0af6486bb37d668546cca3.tar.gz
ruby-b5b554505085d7bccd0af6486bb37d668546cca3.tar.xz
ruby-b5b554505085d7bccd0af6486bb37d668546cca3.zip
add DRb::ExtServManager#uri=.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/drb/extservm.rb6
-rw-r--r--test/drb/drbtest.rb1
3 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 4e4691a2d..ba38fc790 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Nov 9 00:36:26 2004 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
+
+ * lib/drb/extservm.rb: add DRb::ExtServManager#uri=.
+ [ruby-dev:24743]
+
Mon Nov 8 22:20:19 2004 Dave Thomas <dave@pragprog.com>
* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_class):
diff --git a/lib/drb/extservm.rb b/lib/drb/extservm.rb
index d29a0802a..2715c5e9f 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 13f879558..a102f7e3b 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