On Fri, 21 Sep 2001, Johan Holmberg wrote:
>     system "echo In the beginning, to STDOUT I hope."
>
>     $saved_stdout = $stdout
>     $stdout = File.open("log-file", "w")
>
>     system "echo After redirect, to log-file I hope."
>
>     $stdout = $saved_stdout
>
>     system "echo Original restored, to STDOUT I hope."

Try changing:
    $saved_stdout = $stdout

to:
    $saved_stdout = $stdout.clone

Paul