Module: Kernel

Defined in:
lib/extensions/kernel.rb

Instance Method Summary collapse

Instance Method Details

#with_warnings_suppressedObject

Suppresses warnings within a given block.



4
5
6
7
8
9
10
# File 'lib/extensions/kernel.rb', line 4

def with_warnings_suppressed
  original_verbosity = $VERBOSE
  $VERBOSE = nil
  yield
ensure
  $VERBOSE = original_verbosity
end