From: patrick-may@... (Patrick May) Date: 2002-08-17T17:38:25+09:00 Subject: Re: How do I dup file descriptors in ruby? (diverting STDERR) "Richard A. Ryan" wrote in message news:<3D5D7E39.7050601@fsl.noaa.gov>... > How would I do the equivalent to the following > Korn/Bourne code in ruby? perhaps like this? old_stderr = $stderr begin File.open( "logfile.text", "a" ) { |log| $stderr = logfile #... do stuff } ensure $stderr = old_stderr end ~ Patrick