method

silence_stream

v4.2.9 - Show latest stable - Class: Kernel
silence_stream(stream)
public

Deprecated : this method is not thread safe Silences any stream for the duration of the block.

silence_stream(STDOUT) do
  puts 'This will never be seen'
end

puts 'But this will'

This method is not thread-safe.