Class: IRB::ExtendCommand::Fork
Instance Attribute Summary
Attributes inherited from Nop
Instance Method Summary collapse
Methods inherited from Nop
Constructor Details
This class inherits a constructor from IRB::ExtendCommand::Nop
Instance Method Details
#execute ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/irb/cmd/fork.rb', line 18 def execute pid = __send__ ExtendCommand.irb_original_method_name("fork") unless pid class << self alias_method :exit, ExtendCommand.irb_original_method_name('exit') end if block_given? begin yield ensure exit end end end pid end |