Skip to content

Commit

Permalink
Merge branch 'master' of github.com:lotus/utils
Browse files Browse the repository at this point in the history
  • Loading branch information
jodosha committed Sep 22, 2014
2 parents 0ddb0a0 + b1a5a20 commit 2ea4a95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/lotus/utils/io.rb
Expand Up @@ -9,7 +9,7 @@ class IO
# Revised version of ActiveSupport's `Kernel.with_warnings` implementation
# @see https://github.com/rails/rails/blob/v4.1.2/activesupport/lib/active_support/core_ext/kernel/reporting.rb#L25
#
# @param blk [Proc] the block of code that generates warnings.
# @yield the block of code that generates warnings.
#
# @return [void]
#
Expand All @@ -25,9 +25,9 @@ class IO
# Lotus::Utils::IO.silence_warnings do
# Test::TEST_VALUE = 'redefined'
# end
def self.silence_warnings(&blk)
def self.silence_warnings
old_verbose, $VERBOSE = $VERBOSE, nil
blk.call
yield
ensure
$VERBOSE = old_verbose
end
Expand Down

0 comments on commit 2ea4a95

Please sign in to comment.