Commit ad0ea27c authored by antirez's avatar antirez
Browse files

RubyRedis: Array alike operators implemented

parent cd71a570
...@@ -51,6 +51,14 @@ class RedisClient ...@@ -51,6 +51,14 @@ class RedisClient
raise "SELECT not allowed, use the :db option when creating the object" raise "SELECT not allowed, use the :db option when creating the object"
end end
def [](key)
get(key)
end
def []=(key,value)
set(key,value)
end
def read_reply def read_reply
line = @sock.gets line = @sock.gets
case line[0..0] case line[0..0]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment