From ede1393cfcfeec764c7c62919b28bc9f90e15f5b Mon Sep 17 00:00:00 2001 From: tompng Date: Sat, 4 May 2024 12:31:16 +0900 Subject: [PATCH] Change debug test workaround only enabled when output is tty --- lib/irb/input-method.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/irb/input-method.rb b/lib/irb/input-method.rb index 9a24c885b..684527edc 100644 --- a/lib/irb/input-method.rb +++ b/lib/irb/input-method.rb @@ -67,7 +67,7 @@ def initialize # # See IO#gets for more information. def gets - puts + puts if @stdout.tty? # workaround for debug compatibility test print @prompt line = @stdin.gets @line[@line_no += 1] = line