Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
IO::Buffer#readonly?
readonly? → true or false
io_buffer.c
View on GitHub ↗
static VALUE
io_buffer_readonly_p(VALUE self)
{
return RBOOL(rb_io_buffer_readonly_p(self));
}
If the buffer is read only, meaning the buffer cannot be modified using set_value, set_string or copy and similar.
Frozen strings and read-only files create read-only buffers.