Module: IRB

Defined in:
lib/fox16/irb.rb

Class Method Summary collapse

Class Method Details

.start_in_fxirb(redir) ⇒ Object


20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# 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