End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
IO::Buffer#shared?
shared? → true or false
io_buffer.c
View on GitHub ↗
static VALUE
rb_io_buffer_shared_p(VALUE self)
{
struct rb_io_buffer *data = NULL;
TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, data);
return RBOOL(data->flags & RB_IO_BUFFER_SHARED);
}
If the buffer is shared, meaning it references memory that can be shared with other processes (and thus might change without being modified locally).