Module: IRB
- Defined in:
- lib/breakpoint.rb
Overview
Defined Under Namespace
Modules: InputCompletor
Classes: Context, WorkSpace
Class Method Summary
collapse
Class Method Details
.CurrentContext ⇒ Object
502
503
504
505
506
507
508
509
510
|
# File 'lib/breakpoint.rb', line 502
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
497
|
# File 'lib/breakpoint.rb', line 497
alias :old_CurrentContext :CurrentContext
|
.parse_opts ⇒ Object
511
|
# File 'lib/breakpoint.rb', line 511
def IRB.parse_opts() end
|
.start(ap_path = nil, main_context = nil, workspace = nil) ⇒ Object
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
|
# File 'lib/breakpoint.rb', line 460
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
|