Open coezbek opened 3 years ago
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).
eql?
hash
https://github.com/halostatue/diff-lcs/blob/e4b02743f4f2d40cd43b0ec9071d6a5ba9787336/lib/diff/lcs/internals.rb#L294
Would it make sense to document this?
It would be. I’d suggest that it might be worth adding some tests to verify this.
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?
andhash
).https://github.com/halostatue/diff-lcs/blob/e4b02743f4f2d40cd43b0ec9071d6a5ba9787336/lib/diff/lcs/internals.rb#L294
Would it make sense to document this?