summaryrefslogtreecommitdiff
path: root/lib/irb/context.rb
diff options
context:
space:
mode:
authorStan Lo <[email protected]>2024-02-25 23:20:56 +0800
committergit <[email protected]>2024-02-25 15:21:00 +0000
commit898f30f8bd064c9803625c98a3e46bd3434ff1bb (patch)
tree023709237a0b4906e3da3e313297ea7fa0f411af /lib/irb/context.rb
parent3c4d0b13132f9ba3f07575f175d173b69f9bd6ef (diff)
[ruby/irb] Refactor IRB::Context#prompting
(https://github.com/ruby/irb/pull/889) https://github.com/ruby/irb/commit/7b323ee514
Diffstat (limited to 'lib/irb/context.rb')
-rw-r--r--lib/irb/context.rb4
1 files changed, 1 insertions, 3 deletions
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.