| Module | IRB |
| In: |
lib/irb.rb
|
# File lib/irb.rb, line 79
79: def IRB.irb_abort(irb, exception = Abort)
80: if defined? Thread
81: irb.context.thread.raise exception, "abort then interrupt!!"
82: else
83: raise exception, "abort then interrupt!!"
84: end
85: end
initialize IRB and start TOP_LEVEL irb
# File lib/irb.rb, line 51
51: def IRB.start(ap_path = nil)
52: $0 = File::basename(ap_path, ".rb") if ap_path
53:
54: IRB.setup(ap_path)
55:
56: if @CONF[:SCRIPT]
57: irb = Irb.new(nil, @CONF[:SCRIPT])
58: else
59: irb = Irb.new
60: end
61:
62: @CONF[:IRB_RC].call(irb.context) if @CONF[:IRB_RC]
63: @CONF[:MAIN_CONTEXT] = irb.context
64:
65: trap("SIGINT") do
66: irb.signal_handle
67: end
68:
69: catch(:IRB_EXIT) do
70: irb.eval_input
71: end
72: # print "\n"
73: end