1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Add supress_warnings API, so we can quietly redefine methods in Pro/Ent

This commit is contained in:
Mike Perham 2016-11-23 14:25:41 -08:00
parent 1e37c199e8
commit de477440e8

View file

@ -104,3 +104,16 @@ rescue LoadError
end
begin
require 'active_support/core_ext/kernel/reporting'
rescue LoadError
module Kernel
module_function
def silence_warnings
old_verbose, $VERBOSE = $VERBOSE, nil
yield
ensure
$VERBOSE = old_verbose
end
end
end