137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
|
# File 'lib/dev-utils/debug/irb.rb', line 137
def IRB.start_session(object)
unless $irb
IRB.setup nil
end
@CONF[:PROMPT_MODE] = :SIMPLE
workspace = WorkSpace.new(object)
if @CONF[:SCRIPT] $irb = Irb.new(workspace, @CONF[:SCRIPT])
else
$irb = Irb.new(workspace)
end
@CONF[:IRB_RC].call($irb.context) if @CONF[:IRB_RC]
@CONF[:MAIN_CONTEXT] = $irb.context
trap 'INT' do
$irb.signal_handle
end
custom_configuration if defined?(IRB.custom_configuration)
catch :IRB_EXIT do
$irb.eval_input
end
puts
end
|