On Mar 19, 2007, at 6:18 PM, Giles Bowkett wrote:

> Is there an easy way to capture standard out in Ruby, so that "puts"
> throws its output into a buffer instead of just popping up on the
> screen?

This is exactly the problem shell IO redirection was designed to solve.

$ ruby script.rb > output

What is the use case that prevents you from using shell redirection?



Gary Wright