From 13fc75cf8aa878f8e0b904b2f77979e46e06b814 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 6 Feb 2015 22:45:29 +0000 Subject: [PATCH] favor "a.b(&:c)" form over "a.b { |x| x.c }" The former is shorter Ruby code and also generates smaller bytecode. --- lib/unicorn/http_server.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/unicorn/http_server.rb b/lib/unicorn/http_server.rb index 895f56df..c44a71ee 100644 --- a/lib/unicorn/http_server.rb +++ b/lib/unicorn/http_server.rb @@ -69,7 +69,7 @@ class Unicorn::HttpServer # # Unicorn::HttpServer::START_CTX[0] = "/home/bofh/2.2.0/bin/unicorn" START_CTX = { - :argv => ARGV.map { |arg| arg.dup }, + :argv => ARGV.map(&:dup), 0 => $0.dup, } # We favor ENV['PWD'] since it is (usually) symlink aware for Capistrano @@ -483,7 +483,7 @@ class Unicorn::HttpServer end def after_fork_internal - SELF_PIPE.each { |io| io.close }.clear # this is master-only, now + SELF_PIPE.each(&:close).clear # this is master-only, now @ready_pipe.close if @ready_pipe Unicorn::Configurator::RACKUP.clear @ready_pipe = @init_listeners = @before_exec = @before_fork = nil -- 2.11.4.GIT