Skip to content

Commit

Permalink
Merge pull request #1995 from seuros/yield
Browse files Browse the repository at this point in the history
yield instead of block.call
  • Loading branch information
mperham committed Dec 18, 2014
2 parents c4fc6da + de42941 commit b5899c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/sidekiq/testing.rb
Original file line number Diff line number Diff line change
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 b5899c7

Please sign in to comment.