Module IRB
In: lib/irb.rb

Methods

Classes and Modules

Class IRB::Abort
Class IRB::Irb

Public Class methods

[Source]

    # File lib/irb.rb, line 46
46:   def IRB.CurrentContext
47:     IRB.conf[:MAIN_CONTEXT]
48:   end

[Source]

    # File lib/irb.rb, line 33
33:   def IRB.conf
34:     @CONF
35:   end

[Source]

    # 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

[Source]

    # File lib/irb.rb, line 75
75:   def IRB.irb_exit(irb, ret)
76:     throw :IRB_EXIT, ret
77:   end

initialize IRB and start TOP_LEVEL irb

[Source]

    # 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

IRB version method

[Source]

    # File lib/irb.rb, line 38
38:   def IRB.version
39:     if v = @CONF[:VERSION] then return v end
40: 
41:     require "irb/version"
42:     rv = @RELEASE_VERSION.sub(/\.0/, "")
43:     @CONF[:VERSION] = format("irb %s(%s)", rv, @LAST_UPDATE_DATE)
44:   end

[Validate]