зеркало из https://github.com/github/ruby.git
[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
This commit is contained in:
Родитель
f389a211b5
Коммит
38e3819be6
|
@ -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
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче