summaryrefslogtreecommitdiff
path: root/lib/irb
diff options
context:
space:
mode:
authortomoya ishida <[email protected]>2024-10-09 00:15:39 +0900
committergit <[email protected]>2024-10-08 15:15:43 +0000
commitcb19dfca2c9b315d29c5303203d8d0d1bbbd8511 (patch)
tree20505e1f62fcebc50f45513e6e72d4bc45be7392 /lib/irb
parenta3208330135850c56b6e2e590491cb80bfc839df (diff)
[ruby/irb] Change debug test workaround to use ENV
RUBY_DEBUG_TEST_UI (https://github.com/ruby/irb/pull/1014) https://github.com/ruby/irb/commit/9933584754
Diffstat (limited to 'lib/irb')
-rw-r--r--lib/irb/input-method.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/irb/input-method.rb b/lib/irb/input-method.rb
index 210d3da789..38f05d7716 100644
--- a/lib/irb/input-method.rb
+++ b/lib/irb/input-method.rb
@@ -67,7 +67,9 @@ module IRB
#
# See IO#gets for more information.
def gets
- puts if @stdout.tty? # workaround for debug compatibility test
+ # Workaround for debug compatibility test https://github.com/ruby/debug/pull/1100
+ puts if ENV['RUBY_DEBUG_TEST_UI']
+
print @prompt
line = @stdin.gets
@line[@line_no += 1] = line