Skip to content

Commit 264ba0f

Browse files
tompngmatzbot
authored andcommitted
[ruby/irb] Fix Test timedout in test_debug_cmd
(ruby/irb#582) * Suppress Reline::IOGate.cursor_pos writing escape sequence in test_debug_cmd * Force use Reline::GeneralIO as Reline::IOGate and remove RUBY_DEBUG_NO_RELINE option for debug test
1 parent 4d1ca2e commit 264ba0f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/irb/test_debug_cmd.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module TestIRB
1717

1818
class DebugCommandTestCase < TestCase
1919
IRB_AND_DEBUGGER_OPTIONS = {
20-
"RUBY_DEBUG_NO_RELINE" => "true", "NO_COLOR" => "true", "RUBY_DEBUG_HISTORY_FILE" => ''
20+
"NO_COLOR" => "true", "RUBY_DEBUG_HISTORY_FILE" => ''
2121
}
2222

2323
def setup
@@ -211,7 +211,10 @@ def run_ruby_file(&block)
211211
cmd = [EnvUtil.rubybin, "-I", LIB, @ruby_file.to_path]
212212
tmp_dir = Dir.mktmpdir
213213
rc_file = File.open(File.join(tmp_dir, ".irbrc"), "w+")
214-
rc_file.write("IRB.conf[:USE_SINGLELINE] = true")
214+
rc_file.write(<<~RUBY)
215+
IRB.conf[:USE_SINGLELINE] = true
216+
Reline.const_set(:IOGate, Reline::GeneralIO)
217+
RUBY
215218
rc_file.close
216219

217220
@commands = []

0 commit comments

Comments
 (0)