Skip to content

Commit 7c402d2

Browse files
committed
IO::Buffer: Warn as experimental at allocation
Previously, warned only in `new` and `map`, but not `for` and `string`.
1 parent c353b62 commit 7c402d2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

io_buffer.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,8 @@ io_buffer_extract_offset_length(VALUE self, int argc, VALUE argv[], size_t *offs
479479
VALUE
480480
rb_io_buffer_type_allocate(VALUE self)
481481
{
482+
io_buffer_experimental();
483+
482484
struct rb_io_buffer *buffer = NULL;
483485
VALUE instance = TypedData_Make_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
484486

@@ -649,8 +651,6 @@ rb_io_buffer_new(void *base, size_t size, enum rb_io_buffer_flags flags)
649651
VALUE
650652
rb_io_buffer_map(VALUE io, size_t size, rb_off_t offset, enum rb_io_buffer_flags flags)
651653
{
652-
io_buffer_experimental();
653-
654654
VALUE instance = rb_io_buffer_type_allocate(rb_cIOBuffer);
655655

656656
struct rb_io_buffer *buffer = NULL;
@@ -805,8 +805,6 @@ io_flags_for_size(size_t size)
805805
VALUE
806806
rb_io_buffer_initialize(int argc, VALUE *argv, VALUE self)
807807
{
808-
io_buffer_experimental();
809-
810808
rb_check_arity(argc, 0, 2);
811809

812810
struct rb_io_buffer *buffer = NULL;

0 commit comments

Comments
 (0)