Sha256: 0371f2f7240a52eebb68704b620a5c9f26ce88c824f8d24d8a490085c4338f7f

Contents?: true

Size: 523 Bytes

Versions: 4

Compression:

Stored size: 523 Bytes

Contents

#
#   fork.rb -
#   	$Release Version: 0.9.6 $
#   	$Revision$
#   	by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#

@RCS_ID='-$Id$-'

# :stopdoc:
module IRB
  module ExtendCommand
    class Fork<Nop
      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 iterator?
	    begin
	      yield
	    ensure
	      exit
	    end
	  end
	end
	pid
      end
    end
  end
end
# :startdoc:


Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rubysl-irb-2.1.1 lib/irb/cmd/fork.rb
rubysl-irb-2.1.0 lib/irb/cmd/fork.rb
rubysl-irb-2.0.4 lib/irb/cmd/fork.rb
rubysl-irb-2.0.3 lib/irb/cmd/fork.rb