File tree Expand file tree Collapse file tree 1 file changed +18
-18
lines changed
Expand file tree Collapse file tree 1 file changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -1358,24 +1358,24 @@ make_shareable_check_shareable(VALUE obj)
13581358 }
13591359
13601360 switch (TYPE (obj )) {
1361- case T_IMEMO :
1362- return traverse_skip ;
1363- case T_OBJECT :
1364- {
1365- // If a T_OBJECT is shared and has no free capacity, we can't safely store the object_id inline,
1366- // as it would require to move the object content into an external buffer.
1367- // This is only a problem for T_OBJECT, given other types have external fields and can do RCU.
1368- // To avoid this issue, we proactively create the object_id.
1369- shape_id_t shape_id = RBASIC_SHAPE_ID (obj );
1370- attr_index_t capacity = RSHAPE_CAPACITY (shape_id );
1371- attr_index_t free_capacity = capacity - RSHAPE_LEN (shape_id );
1372- if (!rb_shape_has_object_id (shape_id ) && capacity && !free_capacity ) {
1373- rb_obj_id (obj );
1374- }
1375- }
1376- break ;
1377- default :
1378- break ;
1361+ case T_IMEMO :
1362+ return traverse_skip ;
1363+ case T_OBJECT :
1364+ {
1365+ // If a T_OBJECT is shared and has no free capacity, we can't safely store the object_id inline,
1366+ // as it would require to move the object content into an external buffer.
1367+ // This is only a problem for T_OBJECT, given other types have external fields and can do RCU.
1368+ // To avoid this issue, we proactively create the object_id.
1369+ shape_id_t shape_id = RBASIC_SHAPE_ID (obj );
1370+ attr_index_t capacity = RSHAPE_CAPACITY (shape_id );
1371+ attr_index_t free_capacity = capacity - RSHAPE_LEN (shape_id );
1372+ if (!rb_shape_has_object_id (shape_id ) && capacity && !free_capacity ) {
1373+ rb_obj_id (obj );
1374+ }
1375+ }
1376+ break ;
1377+ default :
1378+ break ;
13791379 }
13801380
13811381 if (!RB_OBJ_FROZEN_RAW (obj )) {
You can’t perform that action at this time.
0 commit comments