Skip to content

Commit

Permalink
yield instead of block.call
Browse files Browse the repository at this point in the history
  • Loading branch information
seuros committed Oct 9, 2014
1 parent bc265f3 commit de42941
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/sidekiq/testing.rb
Expand Up @@ -7,12 +7,12 @@ class Testing
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
Expand Down

0 comments on commit de42941

Please sign in to comment.