natalie icon indicating copy to clipboard operation
natalie copied to clipboard

Support empty string in Addrinfo

Open herwinw opened this issue 1 year ago • 0 comments

I noticed this when trying to find the correct error message:

In MRI:

Addrinfo.new(''.b)
=> #<Addrinfo: empty-sockaddr>

In Natalie:

Addrinfo.new(''.b)
Traceback (most recent call last):
        2: from (repl):1:in `block in block in block'
        1: from (repl):1:in `new'
(repl):1:in `initialize': bad sockaddr (ArgumentError)

This behaviour is currently not covered by the ruby specs.

herwinw avatar Jan 24 '24 09:01 herwinw