class Byebug::LocalInterface


Interface class for standard byebug use.

def initialize

def initialize
  super()
  @input = $stdin
  @output = $stdout
  @error = $stderr
end

def readline(prompt)

Parameters:
  • prompt () -- Prompt to be displayed.
def readline(prompt)
  with_repl_like_sigint { Readline.readline(prompt) || EOF_ALIAS }
end

def with_repl_like_sigint

Other tags:
    Note: - Any external 'INT' traps are overriden during this method.
def with_repl_like_sigint
  orig_handler = trap("INT") { raise Interrupt }
  yield
rescue Interrupt
  puts("^C")
  retry
ensure
  trap("INT", orig_handler)
end