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
27dd1526
Commit
27dd1526
authored
Apr 07, 2009
by
Bob Potter
Browse files
ruby19 compat: use each_line on string
parent
5fba9f71
Changes
1
Hide whitespace changes
Inline
Side-by-side
client-libraries/ruby/lib/redis.rb
View file @
27dd1526
...
@@ -79,7 +79,7 @@ class Redis
...
@@ -79,7 +79,7 @@ class Redis
info
=
{}
info
=
{}
write
(
"INFO
\r\n
"
)
write
(
"INFO
\r\n
"
)
x
=
get_response
x
=
get_response
x
.
each
do
|
kv
|
x
.
each
_line
do
|
kv
|
k
,
v
=
kv
.
split
(
':'
,
2
)
k
,
v
=
kv
.
split
(
':'
,
2
)
k
,
v
=
k
.
chomp
,
v
=
v
.
chomp
k
,
v
=
k
.
chomp
,
v
=
v
.
chomp
info
[
k
.
to_sym
]
=
v
info
[
k
.
to_sym
]
=
v
...
@@ -443,4 +443,4 @@ class Redis
...
@@ -443,4 +443,4 @@ class Redis
end
end
end
end
end
end
\ No newline at end of file
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