From 6018c2f98b62fd3717104d8e386a682baeaa640e Mon Sep 17 00:00:00 2001 From: Michael Witrant Date: Sun, 5 May 2013 15:58:37 +0200 Subject: [PATCH] use symbols in redis proxy methods --- lib/discourse_redis.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/discourse_redis.rb b/lib/discourse_redis.rb index 92a438a7d73..677425c95fe 100644 --- a/lib/discourse_redis.rb +++ b/lib/discourse_redis.rb @@ -43,7 +43,8 @@ class DiscourseRedis lindex linsert llen lpop lpush lpushx lrange lrem lset ltrim mget move mset msetnx persist pexpire pexpireat psetex pttl rename renamenx rpop rpoplpush rpush rpushx sadd scard sdiff set setbit setex setnx setrange sinter sismember smembers sort spop srandmember srem strlen sunion ttl type watch zadd zcard zcount zincrby - zrange zrangebyscore zrank zrem zremrangebyrank zremrangebyscore zrevrange zrevrangebyscore zrevrank zrangebyscore).each do |m| + zrange zrangebyscore zrank zrem zremrangebyrank zremrangebyscore zrevrange zrevrangebyscore zrevrank zrangebyscore + ).map(&:to_sym).each do |m| define_method m do |*args| args[0] = "#{DiscourseRedis.namespace}:#{args[0]}" @redis.send(m, *args)