Module: Girb::ReadmultilinePatch

Defined in:
lib/girb/irb_integration.rb

Overview

Patch to inject pending commands into IRB’s input stream This ensures debug commands are processed at the top level of IRB’s loop

Instance Method Summary collapse

Instance Method Details

#readmultilineObject



304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'lib/girb/irb_integration.rb', line 304

def readmultiline
  # Check for pending commands from girb AI
  if (cmd = Girb::IrbIntegration.take_next_input_command)
    puts "[girb] Injecting command: #{cmd}"
    # Return command with newline so it's processed as complete input
    return cmd.end_with?("\n") ? cmd : "#{cmd}\n"
  end

  result = super

  # After debug command executes and we transition to debug mode,
  # the debug_integration auto_continue mechanism takes over
  result
end