module DRb

def uri

This is the URI of the current server. See #current_server.

Get the URI defining the local dRuby space.
def uri
  drb = Thread.current['DRb']
  client = (drb && drb['client'])
  if client
    uri = client.uri
    return uri if uri
  end
  current_server.uri
end