lib/irb/cmd/fork.rb


DEFINITIONS

This source file includes following functions.


   1  
   2  module IRB
   3    module ExtendCommand
   4      class Fork<Nop
   5        def execute(&block)
   6          pid = send ExtendCommand.irb_original_method_name("fork")
   7          unless pid 
   8            class<<self
   9              alias_method :exit, ExtendCommand.irb_original_method_name('exit')
  10            end
  11            if iterator?
  12              begin
  13                yield
  14              ensure
  15                exit
  16              end
  17            end
  18          end
  19          pid
  20        end
  21      end
  22    end
  23  end
  24  
  25