Module: IRB
- Defined in:
- lib/action_controller/support/breakpoint.rb
Overview
Defined Under Namespace
Modules: InputCompletor
Classes: Context, WorkSpace
Class Method Summary
collapse
Class Method Details
.CurrentContext ⇒ Object
450
451
452
453
454
455
456
457
458
|
# File 'lib/action_controller/support/breakpoint.rb', line 450
def IRB.CurrentContext
if old_CurrentContext.nil? and Breakpoint.use_drb? then
result = Object.new
def result.last_value; end
return result
else
old_CurrentContext
end
end
|
.old_CurrentContext ⇒ Object
447
|
# File 'lib/action_controller/support/breakpoint.rb', line 447
alias :old_CurrentContext :CurrentContext
|
.start(ap_path = nil, main_context = nil, workspace = nil) ⇒ Object
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
|
# File 'lib/action_controller/support/breakpoint.rb', line 410
def self.start(ap_path = nil, main_context = nil, workspace = nil)
$0 = File::basename(ap_path, ".rb") if ap_path
old_verbose, $VERBOSE = $VERBOSE, nil
IRB.setup(ap_path)
$VERBOSE = old_verbose
if @CONF[:SCRIPT] then
irb = Irb.new(main_context, @CONF[:SCRIPT])
else
irb = Irb.new(main_context)
end
if workspace then
irb.context.workspace = workspace
end
@CONF[:IRB_RC].call(irb.context) if @CONF[:IRB_RC]
@CONF[:MAIN_CONTEXT] = irb.context
old_sigint = trap("SIGINT") do
begin
irb.signal_handle
rescue RubyLex::TerminateLineInput
end
end
catch(:IRB_EXIT) do
irb.eval_input
end
ensure
trap("SIGINT", old_sigint)
end
|