Module: IRB

Defined in:
lib/fxirb.rb

Class Method Summary collapse

Class Method Details

.restart(im) ⇒ Object



88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/fxirb.rb', line 88

def IRB.restart(im)
	irb = Irb.new(nil, im)    

	@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

.start_in_fxirb(im) ⇒ Object



77
78
79
80
81
82
83
84
85
86
# File 'lib/fxirb.rb', line 77

def IRB.start_in_fxirb(im)
	if RUBY_VERSION < "1.7.3"
		IRB.initialize(nil)
		IRB.parse_opts
		IRB.load_modules
	else
		IRB.setup(nil)
	end
	IRB.restart(im)
end