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

Prevent erros on ipaddr.IPv6.isValid if argument is null #31

Closed
wants to merge 1 commit into from

Conversation

fdmota
Copy link

@fdmota fdmota commented Nov 20, 2015

No description provided.

@fdmota fdmota closed this Nov 20, 2015
@fdmota fdmota reopened this Nov 20, 2015
@whitequark
Copy link
Owner

No. Don't pass null to is valid, just like you wouldn't pass an array, a DOM node, and so on.

@fdmota
Copy link
Author

fdmota commented Nov 20, 2015

I believe this function is meant to test values. So why assuming that only strings can be passed to it? On the opposite side we could say pass only valid IPs and therefore this function would be useless.

@whitequark
Copy link
Owner

Because the fact that a string is passed is a part of its precondition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants