instance method
with_warnings
Ruby on Rails 3.2.22.5
Since v3.0.20Signature
with_warnings(flag)
Sets $VERBOSE for the duration of the block and back to its original value afterwards.
Parameters
-
flagreq
Source
# File activesupport/lib/active_support/core_ext/kernel/reporting.rb, line 22
def with_warnings(flag)
old_verbose, $VERBOSE = $VERBOSE, flag
yield
ensure
$VERBOSE = old_verbose
end
Defined in activesupport/lib/active_support/core_ext/kernel/reporting.rb line 22
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Kernel