Sha256: 73cb580265e2f98e03284531a955deeabf6c04004b1f7ddcd2f97a0190b5099a
Contents?: true
Size: 640 Bytes
Versions: 10
Compression:
Stored size: 640 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
10 entries across 10 versions & 1 rubygems