-
Notifications
You must be signed in to change notification settings - Fork 1
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
Implement uniqueness (hash equality) #129
Conversation
Will reduce duplicates when using `.uniq`, to get even better result the user could first normalize, then uniq. Close #123
Couldn't help myself from checking how Ruby does it for the URI class. If I get it correctly they stuff all "components" into an array and piggyback on that array's hash. Feels kind of neat as we'd avoid the usage of |
Link to the components in URI: https://github.com/ruby/ruby/blob/e6d1c72bec5c6544e9ae82501a6cdd7460222096/lib/uri/generic.rb#L44-L53 |
👍🏻 I’m thinking we don’t want “implicit cleaning” by using the components, thus. maybe |
SGTM! |
No need to calculate our own, since it is has the same properties as the string hash.
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.
LGTM
So, should we handle this as a strict bugfix, i.e. patch release? I'm thinking this should be released as a patch, the reasoning is that if you write code with |
Sounds reasonable, not sure what other unreleased stuff we have though, so it might be a minor release anyway (or even major) :) |
Hehe, yup. :) |
Will reduce duplicates when using
.uniq
, to get even better result the user could first normalize, then uniq.Close #123