From caa3cae5351397fd7e1661dae291bcfbe218fa4a Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 6 May 2013 09:51:09 +1000 Subject: [PATCH] remove pointless to_sym --- lib/discourse_redis.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/discourse_redis.rb b/lib/discourse_redis.rb index 677425c95fe..931ea6e13c6 100644 --- a/lib/discourse_redis.rb +++ b/lib/discourse_redis.rb @@ -38,13 +38,13 @@ class DiscourseRedis end # Proxy key methods through, but prefix the keys with the namespace - %w(append blpop brpop brpoplpush decr decrby del exists expire expireat get getbit getrange getset hdel - hexists hget hgetall hincrby hincrbyfloat hkeys hlen hmget hmset hset hsetnx hvals incr incrby incrbyfloat - 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 - ).map(&:to_sym).each do |m| + [:append, :blpop, :brpop, :brpoplpush, :decr, :decrby, :del, :exists, :expire, :expireat, :get, :getbit, :getrange, :getset, + :hdel, :hexists, :hget, :hgetall, :hincrby, :hincrbyfloat, :hkeys, :hlen, :hmget, :hmset, :hset, :hsetnx, :hvals, :incr, + :incrby, :incrbyfloat, :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| define_method m do |*args| args[0] = "#{DiscourseRedis.namespace}:#{args[0]}" @redis.send(m, *args)