lib/evrone/common/spawn/process.rb in evrone-common-spawn-0.0.2 vs lib/evrone/common/spawn/process.rb in evrone-common-spawn-0.0.3
- old
+ new
@@ -53,10 +53,10 @@
rs, _, _ = IO.select([reader], nil, nil, interval)
if rs
break if rs[0].eof?
- yield rs[0].readpartial(8192)
+ yield rs[0].readpartial(8192) if block_given?
read_timeout.reset
else
break if read_timeout.happened?
end
end