Sha256: b98db9de00ba2d2dbcb35f4c9b6a2085089c64413752bf0f92a67d79afeee8c5

Contents?: true

Size: 642 Bytes

Versions: 25

Compression:

Stored size: 642 Bytes

Contents

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


# :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 block_given?
            begin
              yield
            ensure
              exit
            end
          end
        end
        pid
      end
    end
  end
end
# :startdoc:

Version data entries

25 entries across 25 versions & 2 rubygems

Version Path
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/irb-1.4.1/lib/irb/cmd/fork.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/irb-1.4.1/lib/irb/cmd/fork.rb
irb-1.4.1 lib/irb/cmd/fork.rb
irb-1.4.0 lib/irb/cmd/fork.rb
irb-1.3.8.pre.11 lib/irb/cmd/fork.rb
irb-1.3.8.pre.10 lib/irb/cmd/fork.rb
irb-1.3.8.pre.9 lib/irb/cmd/fork.rb
irb-1.3.8.pre.8 lib/irb/cmd/fork.rb
irb-1.3.8.pre.7 lib/irb/cmd/fork.rb
irb-1.3.8.pre.6 lib/irb/cmd/fork.rb
irb-1.3.8.pre.5 lib/irb/cmd/fork.rb
irb-1.3.8.pre.4 lib/irb/cmd/fork.rb
irb-1.3.8.pre.3 lib/irb/cmd/fork.rb
irb-1.3.8.pre.2 lib/irb/cmd/fork.rb
irb-1.3.8.pre.1 lib/irb/cmd/fork.rb
irb-1.3.7 lib/irb/cmd/fork.rb
irb-1.3.6 lib/irb/cmd/fork.rb
irb-1.3.5 lib/irb/cmd/fork.rb
irb-1.3.4 lib/irb/cmd/fork.rb
irb-1.3.3 lib/irb/cmd/fork.rb