instance method
IO::Buffer#valid?
() -> bool
valid? → true or false
io_buffer.c
View on GitHub ↗
static VALUE
rb_io_buffer_valid_p(VALUE self)
{
struct rb_io_buffer *buffer = NULL;
TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
return RBOOL(io_buffer_validate(buffer));
}
Returns whether the buffer buffer is accessible.
A buffer becomes invalid if it is a slice of another buffer (or string) which has been freed or re-allocated at a different address.