-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 Socket::IPAddress#link_local?
#13204
Add Socket::IPAddress#link_local?
#13204
Conversation
Co-authored-by: Mike Robbins <[email protected]>
Does EDIT: Actually it's not that way on the Ruby side, either, so I don't understand where/how this method gets used. |
The thread that the issue author links (who is also the author of) is about detecting non-public ip addresses, mainly I don't think it should be under |
I think it makes sense to have a dedicated method for it, but my understanding is while |
I'd personally vote for irb(main):002:0> IPAddr.new('169.254.169.254').link_local?
=> true
irb(main):003:0> IPAddr.new('169.254.169.254').private?
=> false edit: |
I commented some clarification in #13198 (comment) |
I don't really have any strong arguments in favor of a |
Socket::IPAddress#link_local?
This PR adds
Socket::IPAddress#link_local?
like Ruby's(the spec examples are also from Ruby)
fix partially: #13198