Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
class method
DRb::DRbProtocol.open
open(uri, config, first=true)
lib/drb/drb.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/lib/drb/drb.rb, line 736
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
Open a client connection to uri with the configuration config.
The DRbProtocol module asks each registered protocol in turn to try to open the URI. Each protocol signals that it does not handle that URI by raising a DRbBadScheme error. If no protocol recognises the URI, then a DRbBadURI error is raised. If a protocol accepts the URI, but an error occurs in opening it, a DRbConnError is raised.