Skip to content

Commit

Permalink
Return nil when the multibulk reply is -1.
Browse files Browse the repository at this point in the history
  • Loading branch information
soveran committed May 27, 2010
1 parent 17d40d8 commit ceda0dc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/redis/client.rb
Expand Up @@ -188,8 +188,11 @@ def format_bulk_reply(line)
end

def format_multi_bulk_reply(line)
n = line.to_i
return if n == -1

reply = []
line.to_i.times { reply << read }
n.times { reply << read }
reply
end

Expand Down

0 comments on commit ceda0dc

Please sign in to comment.