mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
parent
0cec4a14fb
commit
edbd9ed468
2 changed files with 9 additions and 1 deletions
|
@ -1922,7 +1922,7 @@ generic_field_set(VALUE obj, shape_id_t target_shape_id, VALUE val)
|
|||
else {
|
||||
attr_index_t index = RSHAPE_INDEX(target_shape_id);
|
||||
if (index >= RSHAPE_CAPACITY(current_shape_id)) {
|
||||
fields_obj = rb_imemo_fields_new(rb_obj_class(obj), index);
|
||||
fields_obj = rb_imemo_fields_new(rb_obj_class(obj), RSHAPE_CAPACITY(target_shape_id));
|
||||
if (original_fields_obj) {
|
||||
attr_index_t fields_count = RSHAPE_LEN(current_shape_id);
|
||||
VALUE *fields = rb_imemo_fields_ptr(fields_obj);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue