From: Daniel Schierbeck Date: 2007-03-20T08:08:33+09:00 Subject: Re: capturing standard out? On Tue, 2007-03-20 at 07:18 +0900, 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? You can set the $stdout global variable to point to whatever object you like, as long as it adheres to a simple interface. Kernel#puts simply redirects to $stdout. Cheers, Daniel