Skip to content

Commit

Permalink
Merge pull request #6 from ruby/typos
Browse files Browse the repository at this point in the history
Fix method names "regist" as "register"
  • Loading branch information
hsbt authored Nov 3, 2021
2 parents e4b7b68 + 9a1ff28 commit 82643ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/drb/extserv.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -29,7 +29,7 @@ def front

def stop_service
synchronize do
@invoker.unregist(@name)
@invoker.unregister(@name)
server = @server
@server = nil
server.stop_service
Expand Down
6 changes: 4 additions & 2 deletions lib/drb/extservm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 82643ca

Please sign in to comment.