123456789_123456789_123456789_123456789_123456789_

Class: IRB::ExtendCommand::Fork

Do not use. This class is for internal use only.
Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Nop
Instance Chain:
self, Nop
Inherits: IRB::ExtendCommand::Nop
Defined in: lib/irb/cmd/fork.rb

Class Method Summary

Nop - Inherited

.execute

See additional method definition at line 18.

.new

Instance Attribute Summary

Nop - Inherited

Instance Method Summary

Nop - Inherited

Constructor Details

This class inherits a constructor from IRB::ExtendCommand::Nop

Instance Method Details

#execute

[ GitHub ]

  
# 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