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::Buffer#valid?

valid? → true or false

Returns whether the buffer data is accessible.

A buffer becomes invalid if it is a slice of another buffer which has been freed.

See also #transfer #write #to_s also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2