Skip to content
Browse files

Passing start to String#index breaks things

  • Loading branch information...
1 parent adccc64 commit 742a3900d30dec263b64de3d3379831942a6c641 @pietern pietern committed Mar 13, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 lib/redis/connection/ruby.rb
View
6 lib/redis/connection/ruby.rb
@@ -36,11 +36,9 @@ def read(nbytes)
def gets
crlf = nil
- start = 0
- while (crlf = @buffer.index(CRLF, start)) == nil
- start = @buffer.bytesize
- @buffer << _read_from_socket(16384)
+ while (crlf = @buffer.index(CRLF)) == nil
+ @buffer << _read_from_socket(1024)
end
@buffer.slice!(0, crlf + CRLF.bytesize)

0 comments on commit 742a390

Please sign in to comment.
Something went wrong with that request. Please try again.