From: Eric Hodel Date: 2009-03-10T09:59:37+09:00 Subject: Re: $stdout changing? On Mar 9, 2009, at 17:35, Tim Mcd wrote: > Is it possible for me to have output that go to the $stdout go > through a > method instead? ie: > > Have stuff go through this: > > def write_to(str) > @socket.send(str, 0) > end You can assign any object that responds to #write to $stdout. See also: http://blog.segment7.net/articles/2006/08/17/stdout-vs-stdout