From 898f30f8bd064c9803625c98a3e46bd3434ff1bb Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Sun, 25 Feb 2024 23:20:56 +0800 Subject: [ruby/irb] Refactor IRB::Context#prompting (https://github.com/ruby/irb/pull/889) https://github.com/ruby/irb/commit/7b323ee514 --- lib/irb/context.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/irb/context.rb') diff --git a/lib/irb/context.rb b/lib/irb/context.rb index d2d0bed522..9647327037 100644 --- a/lib/irb/context.rb +++ b/lib/irb/context.rb @@ -479,9 +479,7 @@ module IRB # StdioInputMethod or RelineInputMethod or ReadlineInputMethod, see #io # for more information. def prompting? - verbose? || (STDIN.tty? && @io.kind_of?(StdioInputMethod) || - @io.kind_of?(RelineInputMethod) || - (defined?(ReadlineInputMethod) && @io.kind_of?(ReadlineInputMethod))) + verbose? || @io.prompting? end # The return value of the last statement evaluated. -- cgit v1.2.3