No point in increasing the complexity for cases it's not.
---
extras/exec_cgi.rb | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/extras/exec_cgi.rb b/extras/exec_cgi.rb
index f143ac7..babda3c 100644
--- a/extras/exec_cgi.rb
+++ b/extras/exec_cgi.rb
@@ -31,10 +31,8 @@ def initialize(rd)
end
def each
- buf = @body_tip || ''.dup
- if buf.size > 0
- yield buf
- end
+ buf = @body_tip
+ yield buf unless buf.empty?
case tmp = @rd.read_nonblock(8192, buf, exception: false)
when :wait_readable
--
EW
--
unsubscribe: [email protected]
archive: https://yhbt.net/yahns-public/