
module Kernel

  # Sets $VERBOSE to true for the duration of the block
  # and back to its original value afterwards.

  def enable_warnings
    old_verbose, $VERBOSE = $VERBOSE, true
    yield
  ensure
    $VERBOSE = old_verbose
  end

end
