Skip to content

Commit 927ed9c

Browse files
committed
Remove dead code.
1 parent 31fc98c commit 927ed9c

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

lib/protocol/rack/input.rb

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def flush
8989
# No-op.
9090
end
9191

92-
def sysread(size, buffer = nil)
92+
def sysread(size, buffer)
9393
if @body
9494
# User's may forget to call #close...
9595
if chunk = @body.read
@@ -100,13 +100,8 @@ def sysread(size, buffer = nil)
100100
@closed = true
101101
end
102102

103-
if buffer
104-
# If a buffer is provided, we copy the chunk into it:
105-
buffer.replace(chunk)
106-
else
107-
# Otherwise we return the chunk directly:
108-
buffer = chunk
109-
end
103+
# The buffer is always provided, and we replace its contents:
104+
buffer.replace(chunk)
110105

111106
return buffer
112107
else

0 commit comments

Comments
 (0)