KeywordMute matcher: more closely mimic Regexp#=~ behavior.
Regexp#=~ returns nil if it does not match. An empty mute set does not match any status, so KeywordMute::Matcher#=~ ought to return nil also.lolsob-rspec
parent
4ab1534f6c
commit
e8314ee2a6
|
@ -61,7 +61,7 @@ class Glitch::KeywordMute < ApplicationRecord
|
|||
end
|
||||
|
||||
def =~(str)
|
||||
regex ? regex =~ str : false
|
||||
regex ? regex =~ str : nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue