Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add type restriction host : String in TCPSocket and Addrinfo #14703

Conversation

straight-shoota
Copy link
Member

The type of the host and domain parameter in several methods of TCPSocket and Addrinfo is effectively String. This patch adds the respective type restriction.

Other parameters could use similar restrictions, but might need more research. port/service seems to accept Int | String, for example.

Resolves #14699

@straight-shoota straight-shoota added this to the 1.13.0 milestone Jun 13, 2024
@straight-shoota straight-shoota merged commit 47e7b16 into crystal-lang:master Jun 14, 2024
61 checks passed
@straight-shoota straight-shoota deleted the chore/tcp_socket-restrict-host branch June 14, 2024 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Passing nil to Addrinfo.getaddrinfo gives unexpected error message
2 participants