Skip to content

Commit 9a59373

Browse files
authored
Merge pull request #181 from osyoyu/no-nread
Remove usage of IO#nread
2 parents 5584117 + daf314a commit 9a59373

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/webrick/server.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,7 @@ def start(&block)
174174
if svrs[0].include? sp
175175
# swallow shutdown pipe
176176
buf = String.new
177-
nil while String ===
178-
sp.read_nonblock([sp.nread, 8].max, buf, exception: false)
177+
nil while String === sp.read_nonblock(8, buf, exception: false)
179178
break
180179
end
181180
svrs[0].each{|svr|

0 commit comments

Comments
 (0)