From 7d032e5c0d1ded084a0fca2df69a8d53bfe38a25 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Mon, 8 Nov 2021 23:33:37 +0100 Subject: [PATCH] Buffer: Prevent replacement of "\r" message --- lib/runner/connection/buffer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/runner/connection/buffer.rb b/lib/runner/connection/buffer.rb index 6d624491..cf8ca6fc 100644 --- a/lib/runner/connection/buffer.rb +++ b/lib/runner/connection/buffer.rb @@ -72,7 +72,7 @@ class Runner::Connection::Buffer @global_buffer = +'' # For our buffering, we identified line breaks with the `\n` and removed those temporarily. # Thus, we now re-add the `\n` at the end of the string and remove the `\r` in the same time. - message = message.gsub(/\r$/, "\n") + message = message.gsub(/\r$/, "\n") unless message.length == 1 @line_buffer.push message end