1
0
Fork 1
forked from fedi/mastodon

Apply Rubocop Performance/StringReplacement (#23445)

This commit is contained in:
Nick Schonning 2023-02-07 21:21:21 -05:00 committed by talon
parent f6e4db701a
commit 537c5e5a2d

View file

@ -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