On Fri, 24 May 2002, Nikodemus Siivola wrote:

> commands.each do |cmd|
>    Open3.popen3(cmd) do |in,out,err|
>    	out = out.readlines
>    	err = err.readlines
>    	puts out unless out.empty?
>    	raise err unless err.empty?
>    end
> end

Two fixes and it even works:

sub(/in/, "stdin")                   # reserved word, silly me
sub(/err unless/, "err.join unless") # raise won't take an array

 -- Nikodemus