In the standard Ruby library since 3.0.0 the signature for the TCPSocket initializer is
TCPSocket.new(remote_host, remote_port, local_host=nil, local_port=nil, connect_timeout: nil) link
I should be able to call the initializer with a remote_host, a remote_port, and a connect_timeout entry, like so:
TCPSocket.new('host.example.com', 1234, connect_timeout: 1000)
This works against the standard library, but fails when resolv-replace is in place, because the connect_timeout keyword argument is not properly handled. Instead, the connect_timeout argument is treated as a hash { connect_timeout: 1000 } as there's an error when this is used as the local_host value.
As linked below, this is causing an issue for some users of Dalli.
In the standard Ruby library since 3.0.0 the signature for the TCPSocket initializer is
TCPSocket.new(remote_host, remote_port, local_host=nil, local_port=nil, connect_timeout: nil)linkI should be able to call the initializer with a
remote_host, aremote_port, and aconnect_timeoutentry, like so:TCPSocket.new('host.example.com', 1234, connect_timeout: 1000)This works against the standard library, but fails when
resolv-replaceis in place, because theconnect_timeoutkeyword argument is not properly handled. Instead, theconnect_timeoutargument is treated as a hash{ connect_timeout: 1000 }as there's an error when this is used as thelocal_hostvalue.As linked below, this is causing an issue for some users of Dalli.