Commit 2458045
committed
Remove usage of IO#nread
IO#wait, a method to obtain the number of bytes readable without
blocking, has been removed from io/wait.
ruby/io-wait@1decadc
When WEBrick is combined with io.wait >= 0.4.0, the following error
occurs on shutdown:
ERROR NoMethodError: undefined method 'nread' for an instance of IO
/(snip)/webrick-1.9.1/lib/webrick/server.rb:178:in 'block in WEBrick::GenericServer#start'
WEBrick uses IO#nread to efficiently consume the entire input stream
during shutdown. This patch removes the call to IO#nread, and instead
repeatedly take a fixed size of 8 bytes each iteration.1 parent 5584117 commit 2458045
1 file changed
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
177 | | - | |
178 | | - | |
| 176 | + | |
179 | 177 | | |
180 | 178 | | |
181 | 179 | | |
| |||
0 commit comments