Memoize address_regex locally.

This commit is contained in:
Douwe Maan 2015-08-20 16:44:44 -07:00
parent 3d141d1512
commit 35224d5e7f

View file

@ -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]