From: Michael Neumann Date: 2004-05-19T00:50:35+09:00 Subject: Re: stream filtering On Wed, May 19, 2004 at 12:43:49AM +0900, Ryan Paul wrote: > I'm looking for a way to filter the stdout/stderr streams in ruby. > In python, you can point sys.stdout to any class with a 'write' method- > the write method could then be used to perform filtering actions on > printed text. If it is possible, I would really appreciate a sample. If it > isnt, i'd appreciate suggestions. I think I might try replacing the puts > function, or something like that. a = nil def a.write(str) STDOUT << str.upcase end $stdout = a puts "hallo" # => "HALLO" Regards, Michael