-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
Ruby 2.6 support #437
Ruby 2.6 support #437
Conversation
As of ruby 2.6 the error raise here includes a string with the offending IP in it, which causes the matching to fail. We could just ditch string matching altogether except for 1.9.3 support, which raises a generic ArugmentError.
@@ -10,6 +10,7 @@ def self.validate(current_schema, data, fragments, processor, validator, options | |||
|
|||
begin | |||
ip = IPAddr.new(data) | |||
rescue IPAddr::InvalidAddressError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I considered adding a comment here, since it is confusing, but left explanation in the commit message instead. Happy to add an explicit comment if preferable.
These rubies do not have `IPAddr::InvalidAddressError` defined.
Hey people, could we get this merged and released? It's also breaking the tests on Ruby 2.7 |
Hi! |
Thank you for your contribution. This functionality has been added with PR #457 |
Addresses an
IPAddr
validation error issue with ruby 2.6.Fixes #430