Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions enumerator.c
Original file line number Diff line number Diff line change
Expand Up @@ -3073,7 +3073,7 @@ static const rb_data_type_t enum_chain_data_type = {
enum_chain_memsize,
enum_chain_mark_and_move,
},
0, 0, RUBY_TYPED_FREE_IMMEDIATELY
0, 0, RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED
};

static struct enum_chain *
Expand Down Expand Up @@ -3123,7 +3123,7 @@ enum_chain_initialize(VALUE obj, VALUE enums)

if (!ptr) rb_raise(rb_eArgError, "unallocated chain");

ptr->enums = rb_ary_freeze(enums);
RB_OBJ_WRITE(obj, &ptr->enums, rb_ary_freeze(enums));
ptr->pos = -1;

return obj;
Expand Down Expand Up @@ -3157,7 +3157,7 @@ enum_chain_init_copy(VALUE obj, VALUE orig)

if (!ptr1) rb_raise(rb_eArgError, "unallocated chain");

ptr1->enums = ptr0->enums;
RB_OBJ_WRITE(obj, &ptr1->enums, ptr0->enums);
ptr1->pos = ptr0->pos;

return obj;
Expand Down Expand Up @@ -3388,7 +3388,7 @@ static const rb_data_type_t enum_product_data_type = {
enum_product_memsize,
enum_product_mark_and_move,
},
0, 0, RUBY_TYPED_FREE_IMMEDIATELY
0, 0, RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED
};

static struct enum_product *
Expand Down Expand Up @@ -3444,7 +3444,7 @@ enum_product_initialize(int argc, VALUE *argv, VALUE obj)

if (!ptr) rb_raise(rb_eArgError, "unallocated product");

ptr->enums = rb_ary_freeze(enums);
RB_OBJ_WRITE(obj, &ptr->enums, rb_ary_freeze(enums));

return obj;
}
Expand All @@ -3462,7 +3462,7 @@ enum_product_init_copy(VALUE obj, VALUE orig)

if (!ptr1) rb_raise(rb_eArgError, "unallocated product");

ptr1->enums = ptr0->enums;
RB_OBJ_WRITE(obj, &ptr1->enums, ptr0->enums);

return obj;
}
Expand Down
Loading