module DRb::DRbProtocol
def open(uri, config, first=true)
URI, then a DRbBadURI error is raised. If a protocol accepts the
URI by raising a DRbBadScheme error. If no protocol recognises the
try to open the URI. Each protocol signals that it does not handle that
The DRbProtocol module asks each registered protocol in turn to
Open a client connection to +uri+ with the configuration +config+.
def open(uri, config, first=true) @protocol.each do |prot| begin return prot.open(uri, config) rescue DRbBadScheme rescue DRbConnError raise($!) rescue raise(DRbConnError, "#{uri} - #{$!.inspect}") end end if first && (config[:auto_load] != false) auto_load(uri) return open(uri, config, false) end raise DRbBadURI, 'can\'t parse uri:' + uri end