diff options
author | Kevin Mook <kevin@kevinmook.com> | 2014-04-23 11:35:43 -0400 |
---|---|---|
committer | Kevin Mook <kevin@kevinmook.com> | 2014-04-23 12:58:23 -0400 |
commit | 5b00ec357a82bccb56ee8fe531dd683a2dd7351f (patch) | |
tree | 55aec538625c8cc06b160a035dafa94ef370ec2c /lib | |
parent | 8950f333ee55e26c9f33f9d0012115fd26114a6d (diff) | |
download | diff-lcs-5b00ec357a82bccb56ee8fe531dd683a2dd7351f.tar.gz |
update Diff::LCS::Change and Diff::LCS::ContextChange's '==' methods to compare against the other object's class
Diffstat (limited to 'lib')
-rw-r--r-- | lib/diff/lcs/change.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/diff/lcs/change.rb b/lib/diff/lcs/change.rb index 4077095..3104a51 100644 --- a/lib/diff/lcs/change.rb +++ b/lib/diff/lcs/change.rb @@ -54,6 +54,7 @@ class Diff::LCS::Change include Comparable def ==(other) + (self.class == other.class) and (self.action == other.action) and (self.position == other.position) and (self.element == other.element) @@ -159,6 +160,7 @@ class Diff::LCS::ContextChange < Diff::LCS::Change end def ==(other) + (self.class == other.class) and (@action == other.action) and (@old_position == other.old_position) and (@new_position == other.new_position) and |