Optimize some regex matching (#15528)
* Use Regex#match? * Replace =~ too * Avoid to call match? from Nil * Keep value of Regexp.last_match
This commit is contained in:
@ -93,7 +93,7 @@ module Mastodon
|
||||
|
||||
work_unit = ->(domain) do
|
||||
next if stats.key?(domain)
|
||||
next if options[:exclude_suspended] && domain.match(blocked_domains)
|
||||
next if options[:exclude_suspended] && domain.match?(blocked_domains)
|
||||
|
||||
stats[domain] = nil
|
||||
|
||||
|
Reference in New Issue
Block a user