From f545b536932b56127abe6a7b933af87e0485bd8e Mon Sep 17 00:00:00 2001 From: Anton Davydov Date: Tue, 9 Jun 2015 23:37:29 +0300 Subject: [PATCH] Use new proc syntax instead Proc.new --- lib/sidekiq/manager.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/sidekiq/manager.rb b/lib/sidekiq/manager.rb index 976dfa83..12db2dc0 100644 --- a/lib/sidekiq/manager.rb +++ b/lib/sidekiq/manager.rb @@ -135,15 +135,15 @@ module Sidekiq end PROCTITLES = [ - Proc.new { 'sidekiq'.freeze }, - Proc.new { Sidekiq::VERSION }, - Proc.new { |mgr, data| data['tag'] }, - Proc.new { |mgr, data| "[#{mgr.busy.size} of #{data['concurrency']} busy]" }, - Proc.new { |mgr, data| "stopping" if mgr.stopped? }, + proc { 'sidekiq'.freeze }, + proc { Sidekiq::VERSION }, + proc { |mgr, data| data['tag'] }, + proc { |mgr, data| "[#{mgr.busy.size} of #{data['concurrency']} busy]" }, + proc { |mgr, data| "stopping" if mgr.stopped? }, ] def heartbeat(key, data, json) - results = PROCTITLES.map {|x| x.call(self, data) } + results = PROCTITLES.map {|x| x.(self, data) } results.compact! $0 = results.join(' ')