Not sure if this is what you are looking for, but you can use capture3
instead of popen3 to capture the output.
command = "clist -lo"
require 'open3'
stdout, stderr, status = Open3.capture3(command)
puts "stdout: #{stdout}"
puts "stderr: #{stderr}"
puts "status: #{status}"
results in
stdout: 7zip.install 9.22.01.20130618
autohotkey_l 1.1.13.01
autohotkey_l.install 1.1.13.01
chocolatey 0.9.8.23
ChocolateyGUI 0.11.1
ConsoleZ 1.9.1.13351
cyg-get 1.1.0
cygwin 1.7.23.20130814
expresso 3.0.4334.20120225
git.install 1.8.3
Listary 4.02.1360
PowerShell 3.0.20121027
putty 0.63.0
ruby 2.0.0.24700
TeraCopy 2.27
Reading environment variables from registry. Please wait... Done.
stderr:
status: pid 47528 exit 0
for me