Hi,

I search the ruby-talk and find a few discussion on redirecting the
STDIN, STDOUT and STDERR. However, I still couldn't get it to work on
redirecting the IO to file and also to the console. I am working on
windows.

Here is what I want to do,
1. run irb,
2. run a command like :
   log "c:\irb_log.txt"
3. continue on irb and run other command, all the stdin, stdout and
stderr will be logging into the irb_log.txt and still showing on screen.
4. run nolog,    :it will stop loggin the stdin, stdout and stderr.

Anyone has any idea how to do this?
I have try to redirect the output like STDOUT.repopen("c:\tmp.log",
"w"), but i will not get the output on the console.

Thanks in advance.
-- 
Posted via http://www.ruby-forum.com/.