Class Index [+]

Quicksearch

ActiveSupport::Testing::Isolation::Forking

Public Instance Methods

run_in_isolation(&blk) click to toggle source
     # File lib/active_support/testing/isolation.rb, line 94
 94:         def run_in_isolation(&blk)
 95:           read, write = IO.pipe
 96: 
 97:           pid = fork do
 98:             read.close
 99:             proxy = ProxyTestResult.new
100:             retval = yield proxy
101:             write.puts [Marshal.dump([retval, proxy])].pack("m")
102:             exit!
103:           end
104: 
105:           write.close
106:           result = read.read
107:           Process.wait2(pid)
108:           return result.unpack("m")[0]
109:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.