diff options
Diffstat (limited to 'app/models/external_issue.rb')
-rw-r--r-- | app/models/external_issue.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/models/external_issue.rb b/app/models/external_issue.rb index 26712c19b5a..e63f89a9f85 100644 --- a/app/models/external_issue.rb +++ b/app/models/external_issue.rb @@ -24,6 +24,11 @@ class ExternalIssue def ==(other) other.is_a?(self.class) && (to_s == other.to_s) end + alias_method :eql?, :== + + def hash + [self.class, to_s].hash + end def project @project @@ -43,7 +48,7 @@ class ExternalIssue end def reference_link_text(from_project = nil) - return "##{id}" if /^\d+$/.match(id) + return "##{id}" if id =~ /^\d+$/ id end |