Module: Kernel

Defined in:
lib/core_ext/ruby/kernel/silence_warnings.rb

Instance Method Summary collapse

Instance Method Details

#silence_warningsObject



2
3
4
5
6
7
# File 'lib/core_ext/ruby/kernel/silence_warnings.rb', line 2

def silence_warnings
  old_verbose, $VERBOSE = $VERBOSE, nil
  yield
ensure
  $VERBOSE = old_verbose
end