natalie
natalie copied to clipboard
Support empty string in Addrinfo
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.