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