If you call DRb.start_service(nil, some_obj), then DRb.uriyou return the local URI, including the port number that another process can use to make calls.
I just want some code to find a random available port and return that port number instead of starting a full service DRb. Is there an easy way to do this in Ruby?
source
share