From 9a1ff286bc23568ab56197d2fabe7d4087085b5b Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 3 Nov 2021 19:10:09 +0900 Subject: [PATCH] Fix method names "regist" as "register" --- lib/drb/extserv.rb | 4 ++-- lib/drb/extservm.rb | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/drb/extserv.rb b/lib/drb/extserv.rb index a93d5d1..9523fe8 100644 --- a/lib/drb/extserv.rb +++ b/lib/drb/extserv.rb @@ -18,7 +18,7 @@ def initialize(there, name, server=nil) @name = name ro = DRbObject.new(nil, there) synchronize do - @invoker = ro.regist(name, DRbObject.new(self, @server.uri)) + @invoker = ro.register(name, DRbObject.new(self, @server.uri)) end end attr_reader :server @@ -29,7 +29,7 @@ def front def stop_service synchronize do - @invoker.unregist(@name) + @invoker.unregister(@name) server = @server @server = nil server.stop_service diff --git a/lib/drb/extservm.rb b/lib/drb/extservm.rb index 040e4e3..9333a10 100644 --- a/lib/drb/extservm.rb +++ b/lib/drb/extservm.rb @@ -44,19 +44,21 @@ def service(name) end end - def regist(name, ro) + def register(name, ro) synchronize do @servers[name] = ro @cond.signal end self end + alias regist register - def unregist(name) + def unregister(name) synchronize do @servers.delete(name) end end + alias unregist unregister private def invoke_thread