mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 21:21:19 +08:00
DEV: Prefer public_send
over send
.
This commit is contained in:
@ -184,7 +184,7 @@ class DiscourseRedis
|
||||
# prefix the key with the namespace
|
||||
def method_missing(meth, *args, &block)
|
||||
if @redis.respond_to?(meth)
|
||||
DiscourseRedis.ignore_readonly { @redis.send(meth, *args, &block) }
|
||||
DiscourseRedis.ignore_readonly { @redis.public_send(meth, *args, &block) }
|
||||
else
|
||||
super
|
||||
end
|
||||
@ -201,7 +201,7 @@ class DiscourseRedis
|
||||
:zremrangebyscore, :zrevrange, :zrevrangebyscore, :zrevrank, :zrangebyscore ].each do |m|
|
||||
define_method m do |*args|
|
||||
args[0] = "#{namespace}:#{args[0]}" if @namespace
|
||||
DiscourseRedis.ignore_readonly { @redis.send(m, *args) }
|
||||
DiscourseRedis.ignore_readonly { @redis.public_send(m, *args) }
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user