require “open3”
stdin, stdout, stderr = Open3.popen3(‘man ruby’)(You don’t have to use stdin if you don’t want to)
Use the block form.
Open3.popen3(‘man ruby’){ |stdin, stdout, stderr|
…
}
Closes the blocks automatically for you.
Regards,
Dan