diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-02-03 12:37:06 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-02-03 12:37:06 +0300 |
commit | 2f80cbb6759beb412491f9b1b4f0dbcbec6619c0 (patch) | |
tree | f6f03489a739136d2b37205016b92817c75c749b /lib | |
parent | 849d09cfd692c0c54d45baf1ce71cd9c1ea2c6ab (diff) |
Freeze regexp and add a comment
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8620#note_21590440
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/incoming_email.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/incoming_email.rb b/lib/gitlab/incoming_email.rb index 0ea42148c58..a492f904303 100644 --- a/lib/gitlab/incoming_email.rb +++ b/lib/gitlab/incoming_email.rb @@ -35,12 +35,14 @@ module Gitlab end def key_from_fallback_message_id(mail_id) - message_id_regexp = /\Areply\-(.+)@#{Gitlab.config.gitlab.host}\z/ + message_id_regexp = + /\Areply\-(.+)@#{Gitlab.config.gitlab.host}\z/.freeze mail_id[message_id_regexp, 1] end def scan_fallback_references(references) + # It's looking for each <...> references.scan(/(?!<)[^<>]+(?=>)/.freeze) end |