Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-08-21 02:21:31 +0300
committerDouwe Maan <douwe@gitlab.com>2015-08-21 02:21:31 +0300
commit3d141d1512a39b61159026457b31c6f0aecf5b6c (patch)
tree508af9e0a723c27e35ede85155824985eca13544 /lib
parentafb765ad9ef6fd394a9709f6ab519267a761e6ad (diff)
Fix spec by removing global state.
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/reply_by_email.rb14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/gitlab/reply_by_email.rb b/lib/gitlab/reply_by_email.rb
index 4fdeb6b8a74..f93fda4302c 100644
--- a/lib/gitlab/reply_by_email.rb
+++ b/lib/gitlab/reply_by_email.rb
@@ -36,14 +36,12 @@ module Gitlab
end
def address_regex
- @address_regex ||= begin
- wildcard_address = config.address
- return nil unless wildcard_address
-
- regex = Regexp.escape(wildcard_address)
- regex = regex.gsub(Regexp.escape('%{reply_key}'), "(.+)")
- Regexp.new(regex).freeze
- end
+ wildcard_address = config.address
+ return nil unless wildcard_address
+
+ regex = Regexp.escape(wildcard_address)
+ regex = regex.gsub(Regexp.escape('%{reply_key}'), "(.+)")
+ Regexp.new(regex).freeze
end
end
end