module IRB

Public Class Methods

start_in_fxirb(redir) click to toggle source
# File lib/fox16/irb.rb, line 20
def IRB.start_in_fxirb(redir)
  IRB.initialize(nil)
  IRB.parse_opts
  IRB.load_modules

  irb = Irb.new(nil, redir)

  @CONF[:IRB_RC].call(irb.context) if @CONF[:IRB_RC]
  @CONF[:MAIN_CONTEXT] = irb.context
  trap("SIGINT") do
    irb.signal_handle
  end

  catch(:IRB_EXIT) do
    irb.eval_input
  end
  print "\n"
end