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

Add documentation how to override object equality #70

Open
coezbek opened this issue Jun 6, 2021 · 1 comment
Open

Add documentation how to override object equality #70

coezbek opened this issue Jun 6, 2021 · 1 comment

Comments

@coezbek
Copy link

coezbek commented Jun 6, 2021

It is unclear to me if (at all) and how to define what constitutes equality for diff-lcs. I tried overriding == operator but this did not work.

Looking into the code it seems Hash equality needs to be implemented (i.e. eql? and hash).

def position_hash(enum, interval)

Would it make sense to document this?

@halostatue
Copy link
Owner

It would be. I’d suggest that it might be worth adding some tests to verify this.

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

No branches or pull requests

2 participants