diff options
author | Eric Wong <e@80x24.org> | 2015-11-21 08:52:29 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-11-21 08:55:00 +0000 |
commit | a5d88662a519406eea6f180a010af8ef829464e7 (patch) | |
tree | 77034a0a236921b1ab2c6c237ac92a016de49c10 /lib/rainbows/xepoll_thread_pool/client.rb | |
parent | 9e7fb4e9b5d97cc75892c8faaea46444d438eb61 (diff) | |
download | rainbows-a5d88662a519406eea6f180a010af8ef829464e7.tar.gz |
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.
Diffstat (limited to 'lib/rainbows/xepoll_thread_pool/client.rb')
-rw-r--r-- | lib/rainbows/xepoll_thread_pool/client.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/rainbows/xepoll_thread_pool/client.rb b/lib/rainbows/xepoll_thread_pool/client.rb index 760bbde..ca62727 100644 --- a/lib/rainbows/xepoll_thread_pool/client.rb +++ b/lib/rainbows/xepoll_thread_pool/client.rb @@ -38,8 +38,7 @@ module Rainbows::XEpollThreadPool::Client ep = SleepyPenguin::Epoll EP = ep.new IN = ep::IN | ep::ONESHOT - KATO = {} - KATO.compare_by_identity if KATO.respond_to?(:compare_by_identity) + KATO = {}.compare_by_identity LOCK = Mutex.new Rainbows.at_quit do clients = nil |