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

yield instead of block.call

This commit is contained in:
Abdelkader Boudih 2014-10-09 13:55:07 +00:00
parent bc265f34ca
commit de42941e48

View file

@ -7,12 +7,12 @@ module Sidekiq
class << self
attr_accessor :__test_mode
def __set_test_mode(mode, &block)
if block
def __set_test_mode(mode)
if block_given?
current_mode = self.__test_mode
begin
self.__test_mode = mode
block.call
yield
ensure
self.__test_mode = current_mode
end