Sha256: 40a8561e4646158faa9b4f5e0a544cc5c6946cd00a0025a46185de08d0b5ce59
Contents?: true
Size: 613 Bytes
Versions: 3
Compression:
Stored size: 613 Bytes
Contents
# frozen_string_literal: false # # fork.rb - # by Keiju ISHITSUKA(keiju@ruby-lang.org) # require_relative "nop" module IRB # :stopdoc: 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 # :startdoc: end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
irb-1.7.0 | lib/irb/cmd/fork.rb |
irb-1.6.4 | lib/irb/cmd/fork.rb |
irb-1.6.3 | lib/irb/cmd/fork.rb |