diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-08-20 16:44:44 -0700 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-08-20 16:44:44 -0700 |
commit | 35224d5e7f3e0c978640b7a6dd64e9778c4d1c60 (patch) | |
tree | a8d9610ae2d4413524b74fd0209ee4c3a0fc77e3 /lib | |
parent | 3d141d1512a39b61159026457b31c6f0aecf5b6c (diff) | |
download | gitlab-ce-35224d5e7f3e0c978640b7a6dd64e9778c4d1c60.tar.gz |
Memoize address_regex locally.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/reply_by_email.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/gitlab/reply_by_email.rb b/lib/gitlab/reply_by_email.rb index f93fda4302c..c3fe6778f06 100644 --- a/lib/gitlab/reply_by_email.rb +++ b/lib/gitlab/reply_by_email.rb @@ -21,9 +21,10 @@ module Gitlab end def reply_key_from_address(address) - return unless address_regex + regex = address_regex + return unless regex - match = address.match(address_regex) + match = address.match(regex) return unless match match[1] |