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

Remove usages of #hash to avoid potential hash collisions #216

Closed
wants to merge 1 commit into from

Conversation

jemmaissroff
Copy link
Contributor

@jemmaissroff jemmaissroff commented Oct 27, 2021

This PR removes usage of #hash because there is a potential for hash collisions leading to incorrect memoized results in our current implementation.

See this issue for further explanation.

Still todo on this PR:

  • Once benchmarks run, add content around what we do differently than dry-rb
  • Copy the table printed at the end of the latest benchmark results into the README.md and update this PR
  • If this change merits an update to CHANGELOG.md, add an entry following Keep a Changelog guidelines with semantic versioning

@codecov
Copy link

codecov bot commented Oct 27, 2021

Codecov Report

Merging #216 (19155f5) into main (645f5a6) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 19155f5 differs from pull request most recent head de974ba. Consider uploading reports for the commit de974ba to get more accurate results
Impacted file tree graph

@@            Coverage Diff            @@
##              main      #216   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines          213       213           
=========================================
  Hits           213       213           
Impacted Files Coverage Δ
lib/memo_wise.rb 100.00% <100.00%> (ø)
lib/memo_wise/internal_api.rb 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 645f5a6...de974ba. Read the comment docs.

Copy link
Member

@JacobEvelyn JacobEvelyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We no longer need @_memo_wise_hashes, right?

@jemmaissroff
Copy link
Contributor Author

Resolved in #219

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