X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/4d30232b0408f78d904ee484456e53b2b8fa6b0f..edd9f775f0b51f031a04c7fc7573b276d152a74f:/client-libraries/ruby_2/rubyredis.rb diff --git a/client-libraries/ruby_2/rubyredis.rb b/client-libraries/ruby_2/rubyredis.rb index 23d7b017..ca73d817 100644 --- a/client-libraries/ruby_2/rubyredis.rb +++ b/client-libraries/ruby_2/rubyredis.rb @@ -116,6 +116,7 @@ class RedisClient else sock = TCPSocket.new(host, port, 0) end + sock.setsockopt Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1 # If the timeout is set we set the low level socket options in order # to make sure a blocking read will return after the specified number @@ -152,7 +153,7 @@ class RedisClient bulk = nil argv[0] = argv[0].to_s.downcase argv[0] = Aliases[argv[0]] if Aliases[argv[0]] - if BulkCommands[argv[0]] + if BulkCommands[argv[0]] and argv.length > 1 bulk = argv[-1].to_s argv[-1] = bulk.length end