diff options
author | Erik Michaels-Ober <sferik@gmail.com> | 2014-10-27 17:28:53 +0100 |
---|---|---|
committer | Erik Michaels-Ober <sferik@gmail.com> | 2014-11-29 11:53:24 +0100 |
commit | d1374f99bf3090f3e659687c112ed0c5c0865cfb (patch) | |
tree | e87455ea620155254511180cc1f08c5544ed195c /activejob | |
parent | 56e47cf66d2e3009b4032d0cd2ceb1a6e5e42573 (diff) | |
download | rails-d1374f99bf3090f3e659687c112ed0c5c0865cfb.tar.gz rails-d1374f99bf3090f3e659687c112ed0c5c0865cfb.tar.bz2 rails-d1374f99bf3090f3e659687c112ed0c5c0865cfb.zip |
Pass symbol as an argument instead of a block
Diffstat (limited to 'activejob')
-rw-r--r-- | activejob/test/support/delayed_job/delayed/backend/test.rb | 4 | ||||
-rw-r--r-- | activejob/test/support/integration/adapters/sidekiq.rb | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/activejob/test/support/delayed_job/delayed/backend/test.rb b/activejob/test/support/delayed_job/delayed/backend/test.rb index b50ed36fc2..f80ec3a5a6 100644 --- a/activejob/test/support/delayed_job/delayed/backend/test.rb +++ b/activejob/test/support/delayed_job/delayed/backend/test.rb @@ -43,9 +43,7 @@ module Delayed end def self.create(attrs = {}) - new(attrs).tap do |o| - o.save - end + new(attrs).tap(&:save) end def self.create!(*args); create(*args); end diff --git a/activejob/test/support/integration/adapters/sidekiq.rb b/activejob/test/support/integration/adapters/sidekiq.rb index 3cc9a34993..bdc61a1462 100644 --- a/activejob/test/support/integration/adapters/sidekiq.rb +++ b/activejob/test/support/integration/adapters/sidekiq.rb @@ -48,7 +48,7 @@ module SidekiqJobsManager def can_run? begin - Sidekiq.redis { |conn| conn.connect } + Sidekiq.redis(&:connect) rescue return false end |