gearheads
/
mastodon
Archived
2
0
Fork 0

Apply Rubocop Performance/StringReplacement (#23445)

gh/stable
Nick Schonning 2023-02-07 21:21:21 -05:00 committed by GitHub
parent 203739dd3a
commit d3f59f52c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

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