module DeepCover::Tools::SilenceWarnings

Public Instance Methods

silence_warnings() { || ... } click to toggle source

copied from: activesupport/lib/active_support/core_ext/kernel/reporting.rb

# File lib/deep_cover/tools/silence_warnings.rb, line 6
def silence_warnings
  with_warnings(nil) { yield }
end
with_warnings(flag) { || ... } click to toggle source
# File lib/deep_cover/tools/silence_warnings.rb, line 10
def with_warnings(flag)
  old_verbose = $VERBOSE
  $VERBOSE = flag
  yield
ensure
  $VERBOSE = old_verbose
end