]> cat aescling's git repositories - mastodon.git/commitdiff
Remove nil check in Glitch::KeywordMute#=~.
authorDavid Yip <yipdw@member.fsf.org>
Wed, 25 Oct 2017 00:03:59 +0000 (19:03 -0500)
committerDavid Yip <yipdw@member.fsf.org>
Wed, 25 Oct 2017 00:03:59 +0000 (19:03 -0500)
@regex can no longer be nil, so we don't need to check it.

app/models/glitch/keyword_mute.rb

index f0969c65e617ddd500606847e8411092b7965f14..73de4d4b7596b8c2b06dd532b860945ee527b00d 100644 (file)
@@ -39,7 +39,7 @@ class Glitch::KeywordMute < ApplicationRecord
     end
 
     def =~(str)
-      regex ? regex =~ str : nil
+      regex =~ str
     end
 
     private
This page took 0.024405 seconds and 3 git commands to generate.