Skip to content

End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

IO#nread

io.nread → int

Returns number of bytes that can be read without blocking. Returns zero if no information available.

See also #nonblock? #oflush #nonblock= #pathconf also in 3.4 · 3.3 · 3.2 · 3.0