From: Robert Klemme Date: 2011-10-19T18:28:11+09:00 Subject: Re: Return On Tue, Oct 18, 2011 at 10:26 PM, Sam Duncan wrote: > On 19/10/11 08:32, Phillip Gawlowski wrote: >> >> On Tue, Oct 18, 2011 at 8:29 PM, Darryl L. Pierce >>  wrote: >>> >>> The goal of puts is to output text to the console. >> >> To be technical: It provides output to the OS's standard output >> facility. > > $stdout = File.new('/dev/null', 'w') > puts "ohai, I am my OS's standard output facility O_o" Usually redirection is done via: $stdout.reopen("/dev/null") The reason is, that you simply exchange the reference of $stdout but you do not modify the underlying file descriptor. As soon as you invoke another process you will see the output again. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/