Memoize address_regex locally.
This commit is contained in:
parent
3d141d1512
commit
35224d5e7f
1 changed files with 3 additions and 2 deletions
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue