From: David Yip Date: Sun, 15 Oct 2017 01:45:14 +0000 (-0500) Subject: Make use of the regex attr_reader. #164. X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=a4851100fd3f20fdc01a3ebf7942fab6d5d03ebf;p=mastodon.git Make use of the regex attr_reader. #164. It would also have been valid to get rid of the attr_reader, but I like being able to reach inside KeywordMute::Matcher without resorting to instance_variable_get tomfoolery. --- diff --git a/app/models/keyword_mute.rb b/app/models/keyword_mute.rb index d80fcaa60..e1a8c3712 100644 --- a/app/models/keyword_mute.rb +++ b/app/models/keyword_mute.rb @@ -38,7 +38,7 @@ class KeywordMute < ApplicationRecord end def =~(str) - @regex ? @regex =~ str : false + regex ? regex =~ str : false end end end