public Method

Kernel.enable_warnings() { || ... }

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

Source Code

# File active_support/core_ext/kernel/reporting.rb, line 17
def enable_warnings
  old_verbose, $VERBOSE = $VERBOSE, true
  yield
ensure
  $VERBOSE = old_verbose
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.