lib/dalli/socket.rb in dalli-2.7.5 vs lib/dalli/socket.rb in dalli-2.7.6

- old
+ new

@@ -26,20 +26,20 @@ alias :write :kgio_write def readfull(count) value = '' - loop do + while true value << kgio_read!(count - value.bytesize) break if value.bytesize == count end value end def read_available value = '' - loop do + while true ret = kgio_tryread(8196) case ret when nil raise EOFError, 'end of stream' when :wait_readable @@ -88,11 +88,11 @@ module Dalli::Server::KSocket module InstanceMethods def readfull(count) value = '' begin - loop do + while true value << read_nonblock(count - value.bytesize) break if value.bytesize == count end rescue Errno::EAGAIN, Errno::EWOULDBLOCK if IO.select([self], nil, nil, options[:socket_timeout]) @@ -104,10 +104,10 @@ value end def read_available value = '' - loop do + while true begin value << read_nonblock(8196) rescue Errno::EAGAIN, Errno::EWOULDBLOCK break end