Is there something like a null-stream in Ruby?
If you want the full behavior of streams, the best is probably to use: File.open(File::NULL, “w”) Note that File::NULL is new to Ruby 1.9.3; you can use my backports gem: require ‘backports/1.9.3/file/null’ # => Won’t do anything in 1.9.3+ File.open(File::NULL, “w”) # => works even in Ruby 1.8.6 You could also copy the relevant code … Read more