diff --git a/lib/io/stream/generic.rb b/lib/io/stream/generic.rb index ce64c7f..b21d3bf 100644 --- a/lib/io/stream/generic.rb +++ b/lib/io/stream/generic.rb @@ -154,7 +154,7 @@ def write(string, flush: false) @writing.synchronize do @write_buffer << string - flush |= @write_buffer.bytesize >= @block_size + flush |= (@write_buffer.bytesize >= @block_size) if flush self.drain(@write_buffer)