| Module | Kernel |
| In: |
lib/sinatra/core_ext/kernel.rb
|
(Taken from ActiveSupport) Sets $VERBOSE to nil for the duration of the block and back to its original value afterwards.
silence_warnings do
value = noisy_call # no warning voiced
end
noisy_call # warning voiced
# File lib/sinatra/core_ext/kernel.rb, line 10
10: def silence_warnings
11: old_verbose, $VERBOSE = $VERBOSE, nil
12: yield
13: ensure
14: $VERBOSE = old_verbose
15: end