Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/external_issue.rb')
-rw-r--r--app/models/external_issue.rb7
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