-
-
Notifications
You must be signed in to change notification settings - Fork 922
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
Hash#rehash does not properly rehash #4958
Milestone
Comments
Merged
I looked at your impl, and it was fine except for a couple things:
I almost had a fix but I'm pulled away to finish something else. |
ChrisBr
added a commit
to ChrisBr/jruby
that referenced
this issue
Jan 9, 2018
Duplicate keys where just ignored before and inserted again. Fix jruby#4958.
ChrisBr
added a commit
to ChrisBr/jruby
that referenced
this issue
Jan 9, 2018
Duplicate keys where just ignored before and inserted again. Fix jruby#4958.
ChrisBr
added a commit
to ChrisBr/jruby
that referenced
this issue
Jan 10, 2018
Duplicate keys where just ignored before and inserted again. Fix jruby#4958.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
Expected Behavior
When rehashing a hash with equal objects in it, they don't get removed.
I already looked into the issue and it seems that the problem is that Hash#rehash does not handle collisions properly. When two objects have the same hash / bucket number, they get inserted even if they are the same (see example).
Actual Behavior
Hash#rehash should remove the duplicate entries.
The text was updated successfully, but these errors were encountered: