Actions
Bug #21509
closedio/wait: IO#wait raises error when passed nil as timeout
Description
The documentation of the method goes:
wait(timeout = nil, mode = :read) → self, true, or false
However, when passing nil
in the first argument, it fails:
io.wait(nil, :read_write) #=> in 'IO#wait': can't convert NilClass into time interval (TypeError)
This seems inconsistent with other variants and related methods:
io.wait(IO::READABLE | IO::WRITABLE, nil) #=> 5
io.to_io.wait_readable(nil) #=> returns the socket
Updated by nobu (Nobuyoshi Nakada) 2 days ago
- Status changed from Open to Closed
Applied in changeset git|dbf7a0c713c39bdfd22c24e69f4bb0b89c9cab65.
[ruby/io-wait] [Bug #21509] [DOC] Correct IO#wait
description
Actions
Like0
Like0