From a5d88662a519406eea6f180a010af8ef829464e7 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 21 Nov 2015 08:52:29 +0000 Subject: Ruby 1.9.3+-only cleanups unicorn 5 will only support Ruby 1.9.3 and later, so remove some checks for Hash#compare_by_identity and IO.copy_stream which we know exist in Ruby 1.9. Favor &:sym proc dispatch to avoid unnecessary captures and bytecode size increases, too. Finally, ensure we fail fast by converting some literal hashes to use non-arrow syntax for symbolic keys. --- lib/rainbows/fiber/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/rainbows/fiber') diff --git a/lib/rainbows/fiber/base.rb b/lib/rainbows/fiber/base.rb index 7c4fb59..a3c098a 100644 --- a/lib/rainbows/fiber/base.rb +++ b/lib/rainbows/fiber/base.rb @@ -50,7 +50,7 @@ module Rainbows::Fiber::Base false end } - fibs.each { |fib| fib.resume } + fibs.each(&:resume) max_sleep = 1.0 # wake up semi-frequently to prevent SIGKILL from master if max -- cgit v1.2.3-24-ge0c7