diff options
author | Sean McGivern <sean@gitlab.com> | 2017-03-03 14:25:52 +0000 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2017-03-06 14:18:49 +0000 |
commit | 9f612cc428c47a578bef8869e2e93966c021e655 (patch) | |
tree | ff03a6c9437a5a5b68219bf66978b756b514116c /app | |
parent | 86d1e42ab34d15a801b97d4d1b7812fb4259f7e5 (diff) | |
download | gitlab-ce-9f612cc428c47a578bef8869e2e93966c021e655.tar.gz |
Fix issues mentioned but not closed for JIRA
The `ReferenceExtractor` would return an array of `ExternalIssue`
objects, and then perform `Array#-` to remove the issues
closed. `ExternalIssue`s had `==` defined, but not `hash` or `eql?`,
which are used by `Array#-`.
Diffstat (limited to 'app')
-rw-r--r-- | app/models/external_issue.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/external_issue.rb b/app/models/external_issue.rb index b973bbcd8da..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 |