Commit 35224d5e authored by Douwe Maan's avatar Douwe Maan

Memoize address_regex locally.

parent 3d141d15
......@@ -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]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment