lib/goodcheck/issue.rb in goodcheck-1.7.1 vs lib/goodcheck/issue.rb in goodcheck-2.1.0
- old
+ new
@@ -25,7 +25,20 @@
end
@location
end
end
+
+ def ==(other)
+ other.is_a?(Issue) &&
+ other.buffer == buffer &&
+ other.range == range &&
+ other.rule == rule
+ end
+
+ alias eql? ==
+
+ def hash
+ self.class.hash ^ buffer.hash ^ range.hash ^ rule.hash
+ end
end
end