summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-03-23 13:45:26 +0000
committerDouwe Maan <douwe@gitlab.com>2016-03-23 13:45:26 +0000
commitc78f83b5ef7f442619931c5b09037c676b98464e (patch)
tree5df34f335c94d0716964fa2f190c736c944a32c6
parent6c4d6dd684b30b1b0ca30249e2c3a43e67ee3143 (diff)
parent9374b7eb0b28527123abad40a070ee4a5b1f0d9f (diff)
downloadgitlab-ce-c78f83b5ef7f442619931c5b09037c676b98464e.tar.gz
Merge branch 'avoid-name-shadowing' into 'master'
Avoid using the same name between methods and variables @DouweM This is the one with renaming. See merge request !3359
-rw-r--r--lib/gitlab/email/receiver.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/gitlab/email/receiver.rb b/lib/gitlab/email/receiver.rb
index 2ca21af5bc8..d4b6f6d120d 100644
--- a/lib/gitlab/email/receiver.rb
+++ b/lib/gitlab/email/receiver.rb
@@ -45,12 +45,12 @@ module Gitlab
note = create_note(reply)
unless note.persisted?
- message = "The comment could not be created for the following reasons:"
+ msg = "The comment could not be created for the following reasons:"
note.errors.full_messages.each do |error|
- message << "\n\n- #{error}"
+ msg << "\n\n- #{error}"
end
- raise InvalidNoteError, message
+ raise InvalidNoteError, msg
end
end
@@ -63,13 +63,13 @@ module Gitlab
end
def reply_key
- reply_key = nil
+ key = nil
message.to.each do |address|
- reply_key = Gitlab::IncomingEmail.key_from_address(address)
- break if reply_key
+ key = Gitlab::IncomingEmail.key_from_address(address)
+ break if key
end
- reply_key
+ key
end
def sent_notification