From 38e3819be63a0d4be094e7cd478cf8532a7d1d9d Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Thu, 11 Apr 2024 07:16:27 +0800 Subject: [ruby/irb] Add a workaround to make IRB work with debug's tests (https://github.com/ruby/irb/pull/919) https://github.com/ruby/irb/commit/eb442c4dda --- lib/irb.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib') diff --git a/lib/irb.rb b/lib/irb.rb index edc4fc5d53..99fd1c5df0 100644 --- a/lib/irb.rb +++ b/lib/irb.rb @@ -1035,6 +1035,12 @@ module IRB @context.evaluate(statement.code, line_no) when Statement::Command ret = statement.command_class.execute(@context, statement.arg) + # TODO: Remove this output once we have a better way to handle it + # This is to notify `debug`'s test framework that the current input has been processed + # We also need to have a way to restart/stop threads around command execution + # when being used as `debug`'s console. + # https://github.com/ruby/debug/blob/master/lib/debug/irb_integration.rb#L8-L13 + puts "INTERNAL_INFO: {}" if @context.with_debugger && ENV['RUBY_DEBUG_TEST_UI'] == 'terminal' @context.set_last_value(ret) end -- cgit v1.2.3