mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-30 03:50:13 -05:00
Apply Rubocop Performance/StringReplacement (#23445)
This commit is contained in:
parent
203739dd3a
commit
d3f59f52c3
@ -7,7 +7,7 @@ module EmailHelper
|
|||||||
|
|
||||||
def email_to_canonical_email(str)
|
def email_to_canonical_email(str)
|
||||||
username, domain = str.downcase.split('@', 2)
|
username, domain = str.downcase.split('@', 2)
|
||||||
username, = username.gsub('.', '').split('+', 2)
|
username, = username.delete('.').split('+', 2)
|
||||||
|
|
||||||
"#{username}@#{domain}"
|
"#{username}@#{domain}"
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user