Fix Performance/DeletePrefix cop (#24796)
This commit is contained in:
@@ -67,7 +67,7 @@ class ActivityPub::FetchRemoteActorService < BaseService
|
||||
end
|
||||
|
||||
def split_acct(acct)
|
||||
acct.gsub(/\Aacct:/, '').split('@')
|
||||
acct.delete_prefix('acct:').split('@')
|
||||
end
|
||||
|
||||
def supported_context?
|
||||
|
@@ -100,7 +100,7 @@ class ResolveAccountService < BaseService
|
||||
end
|
||||
|
||||
def split_acct(acct)
|
||||
acct.gsub(/\Aacct:/, '').split('@')
|
||||
acct.delete_prefix('acct:').split('@')
|
||||
end
|
||||
|
||||
def fetch_account!
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
class TagSearchService < BaseService
|
||||
def call(query, options = {})
|
||||
@query = query.strip.gsub(/\A#/, '')
|
||||
@query = query.strip.delete_prefix('#')
|
||||
@offset = options.delete(:offset).to_i
|
||||
@limit = options.delete(:limit).to_i
|
||||
@options = options
|
||||
|
Reference in New Issue
Block a user