2009/3/10 Eric Hodel <drbrain / segment7.net>: > 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) >> ¨Βσογλετ®σεξδ¨στς¬ °© >> 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 In this case IO#reopen seems more appropriate IMHO (if it works with Sockets, which I did not verify). It's faster (no Ruby code needed) and will also work for sub processes. Kind regards robert -- remember.guy do |as, often| as.you_can - without end