Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a workaround to make IRB work with debug's tests #919

Merged
merged 1 commit into from
Apr 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/irb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,12 @@ def eval_input
@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

Expand Down
Loading