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:
parent
1e37c199e8
commit
de477440e8
1 changed files with 13 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue