1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Standardize "block" usage

This commit standardizes on the use of `block` over `blk`. I found the usage of
both in the code.
This commit is contained in:
Clint Shryock 2013-07-03 09:25:48 -05:00
parent 7ef726778d
commit 26a1ab2e14
5 changed files with 11 additions and 11 deletions

View file

@ -105,8 +105,8 @@ module Puma
end
def restart!
@options[:on_restart].each do |blk|
blk.call self
@options[:on_restart].each do |block|
block.call self
end
if jruby?

View file

@ -203,8 +203,8 @@ module Puma
#
# This can be called multiple times to add code each time.
#
def on_restart(&blk)
@options[:on_restart] << blk
def on_restart(&block)
@options[:on_restart] << block
end
# Command to use to restart puma. This should be just how to

View file

@ -2,8 +2,8 @@ module Puma
module Delegation
def forward(what, who)
module_eval <<-CODE
def #{what}(*args, &blk)
#{who}.#{what}(*args, &blk)
def #{what}(*args, &block)
#{who}.#{what}(*args, &block)
end
CODE
end

View file

@ -11,7 +11,7 @@ module Puma
# The block passed is the work that will be performed in each
# thread.
#
def initialize(min, max, *extra, &blk)
def initialize(min, max, *extra, &block)
@cond = ConditionVariable.new
@mutex = Mutex.new
@ -22,7 +22,7 @@ module Puma
@min = min
@max = max
@block = blk
@block = block
@extra = extra
@shutdown = false

View file

@ -8,9 +8,9 @@ class TestThreadPool < Test::Unit::TestCase
@pool.shutdown if @pool
end
def new_pool(min, max, &blk)
blk = proc { } unless blk
@pool = Puma::ThreadPool.new(min, max, &blk)
def new_pool(min, max, &block)
block = proc { } unless block
@pool = Puma::ThreadPool.new(min, max, &block)
end
def pause