End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
DRb::DRbObject.new
new(obj, uri=nil)
lib/drb/drb.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/drb/drb.rb, line 1088
def initialize(obj, uri=nil)
@uri = nil
@ref = nil
case obj
when Object
is_nil = obj.nil?
when BasicObject
is_nil = false
end
if is_nil
return if uri.nil?
@uri, option = DRbProtocol.uri_option(uri, DRb.config)
@ref = DRbURIOption.new(option) unless option.nil?
else
@uri = uri ? uri : (DRb.uri rescue nil)
@ref = obj ? DRb.to_id(obj) : nil
end
end
Create a new remote object stub.
obj is the (local) object we want to create a stub for. Normally this is nil. uri is the URI of the remote object that this will be a stub for.