Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
ad0ea27c
Commit
ad0ea27c
authored
May 20, 2009
by
antirez
Browse files
RubyRedis: Array alike operators implemented
parent
cd71a570
Changes
1
Hide whitespace changes
Inline
Side-by-side
client-libraries/ruby_2/rubyredis.rb
View file @
ad0ea27c
...
@@ -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
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment