How to turn off $stdout and $stderr in Ruby -


is possible turn off $stdout , $stderr , not re-direct file; turn off prints out nothing anywhere?

i've tried following code, errors error: invalid argument

$stderr = io.new(0,"w") $stdout = io.new(0,"w") 

this gist show how redirect /dev/null:

https://gist.github.com/moertel/11091573

or answer:

how redirect stderr , stdout file ruby script?

your question needs marked dup.


Comments