Top Level Namespace
Defined Under Namespace
Modules: Fast
Instance Method Summary collapse
-
#suppress_output ⇒ Object
suppress output to avoid parser gem warnings’.
Instance Method Details
#suppress_output ⇒ Object
suppress output to avoid parser gem warnings’
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/fast.rb', line 8 def suppress_output original_stdout = $stdout.clone original_stderr = $stderr.clone $stderr.reopen File.new('/dev/null', 'w') $stdout.reopen File.new('/dev/null', 'w') yield ensure $stdout.reopen original_stdout $stderr.reopen original_stderr end |