about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNick Schonning <nschonni@gmail.com>2023-02-07 21:21:21 -0500
committerGitHub <noreply@github.com>2023-02-08 03:21:21 +0100
commitd3f59f52c33e67e3beec2a6b65cccc86352a1468 (patch)
treea454ef6de07d538df551533d4d2395722062fcc8
parent203739dd3adbfccf96c237bd8f4cf9cefc67ff94 (diff)
Apply Rubocop Performance/StringReplacement (#23445)
-rw-r--r--app/helpers/email_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/email_helper.rb b/app/helpers/email_helper.rb
index 360783c62..0800601f9 100644
--- a/app/helpers/email_helper.rb
+++ b/app/helpers/email_helper.rb
@@ -7,7 +7,7 @@ module EmailHelper
 
   def email_to_canonical_email(str)
     username, domain = str.downcase.split('@', 2)
-    username, = username.gsub('.', '').split('+', 2)
+    username, = username.delete('.').split('+', 2)
 
     "#{username}@#{domain}"
   end