From: Larry Fast Date: 2007-03-28T01:55:15+09:00 Subject: Re: How do I implement the Unix 'tee' function for $stdout? Erik Veenstra wrote: > ["$stdout", "$stderr"].each do |std| > io = eval(std) > old_write = io.method(:write) > > class << io > self > end.module_eval do > > old_write.call(text) Thanks Eric, That's a very elegant solution. Does IO funnel all it's writes through "write"? Including things like putc? And where would I look to find this out? Is it only in the source code? Last question: what does "self" do on the line below "class << io" -- Posted via http://www.ruby-forum.com/.