Sha256: 54b70d033bc52b389c6681997c6d2840b4cfcbd6cc3d2d1c9d6ed305974df627
Contents?: true
Size: 524 Bytes
Versions: 8
Compression:
Stored size: 524 Bytes
Contents
require "open3" require_relative "lib_path" # This example runner is relatively slow, but should work on platforms # which do not support fork, such as Windows. class ShellExampleRunner include LibPath def run(path) command = [ "ruby", "-I", lib_path, path, ] Open3.popen3(*command) do |stdin, stdout, stderr, wait_thr| stdin.close stdout = stdout.read stderr = stderr.read exit_status = wait_thr.value yield stdout, stderr, exit_status end end end
Version data entries
8 entries across 8 versions & 1 rubygems