From: Johannes Barre Date: 2003-12-02T09:55:03+09:00 Subject: buffering of $stdout Hi list! I'm new to ruby, so be nice to me ;) I want to capture everything written to the strout and get it in a variable. So I did this: stdout = $stdout stdoutin, $stdout = IO.pipe puts "Hello World" tmp = $stdout $stdout = stdout $tmp.close variable = stdoutin.readlines.join("\n") It works, but if I write to much, the pipe seems to be full and the script hangs. It will never continue, because I start reading from the pipe when everthing is written. My idea is to start two theads, one for writing and one for reading, but maybe somebody knows a easier way. Please help! Johannes