From: Brian Marick Date: 2001-09-28T13:16:58+09:00 Subject: [ruby-talk:21793] ANN: Fluid 1.2 (changing and restoring globals) Inspired by the recent discussion of some of the trickiness involved in changing and restoring the IO globals, I extended my Fluid class to work with globals. You can now do this: Fluid.let(["$defout", File.open("logfile", "w"), :close]) { puts "This will go to 'logfile'." } puts "This will not." Fluid knows the tricks required to handle $defout and $stderr. It also knows that you can't restore $stdin and $stdout back to the way they were, so it refuses to try. http://visibleworkings.com/ruby/fluid.html -- Brian Marick, marick@testing.com www.testing.com - Software testing services and resources www.testingcraft.com - Where software testers exchange techniques www.visibleworkings.com - Adequate understanding of system internals