about summary refs log tree commit homepage
path: root/lib/dtas/buffer
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-12-27 08:08:49 +0000
committerEric Wong <normalperson@yhbt.net>2013-12-27 08:08:49 +0000
commitf5d04d3986b82dc1b3503dada145f6a0897ce69d (patch)
tree677d42a602730246eb95ae0838dc62fd64a85deb /lib/dtas/buffer
parentf383a08ddbc45a8507eaf9f1654e25d6ea26e108 (diff)
downloaddtas-f5d04d3986b82dc1b3503dada145f6a0897ce69d.tar.gz
buffer/splice: favor &:method for blocks
This is slightly easier-to-read and avoids capturing local
variables.
Diffstat (limited to 'lib/dtas/buffer')
-rw-r--r--lib/dtas/buffer/splice.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dtas/buffer/splice.rb b/lib/dtas/buffer/splice.rb
index 55ce3d5..9093860 100644
--- a/lib/dtas/buffer/splice.rb
+++ b/lib/dtas/buffer/splice.rb
@@ -69,7 +69,7 @@ module DTAS::Buffer::Splice # :nodoc:
   end
 
   def broadcast_inf(targets)
-    if targets.none? { |sink| sink.nonblock? }
+    if targets.none?(&:nonblock?)
       # if all targets are blocking, don't start until they're all writable
       r = IO.select(nil, targets, nil, 0) or return targets
       blocked = targets - r[1]