diff options
| author | Jean Boussier <jean.boussier@gmail.com> | 2025-07-01 10:28:44 +0200 |
|---|---|---|
| committer | Jean Boussier <jean.boussier@gmail.com> | 2025-07-01 12:39:23 +0200 |
| commit | ad65d53aa4d241359df183afd3756653cc1571f9 (patch) | |
| tree | 5d630bcf9cc7c30b016aded921224c1685606df3 /class.c | |
| parent | d3d249b9048b338535ae033acb3606abf174b2da (diff) | |
class.c: Stop deleting __classpath__ / __tmp_classpath__
These used to be private variables to store the class name
but aren't a thing since several versions.
Diffstat (limited to 'class.c')
| -rw-r--r-- | class.c | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -980,20 +980,15 @@ copy_tables(VALUE clone, VALUE orig) rb_id_table_free(RCLASS_M_TBL(clone)); RCLASS_WRITE_M_TBL_EVEN_WHEN_PROMOTED(clone, 0); if (!RB_TYPE_P(clone, T_ICLASS)) { - st_data_t id; - rb_fields_tbl_copy(clone, orig); - CONST_ID(id, "__tmp_classpath__"); - rb_attr_delete(clone, id); - CONST_ID(id, "__classpath__"); - rb_attr_delete(clone, id); } if (RCLASS_CONST_TBL(orig)) { struct clone_const_arg arg; struct rb_id_table *const_tbl; - arg.tbl = const_tbl = rb_id_table_create(0); + struct rb_id_table *orig_tbl = RCLASS_CONST_TBL(orig); + arg.tbl = const_tbl = rb_id_table_create(rb_id_table_size(orig_tbl)); arg.klass = clone; - rb_id_table_foreach(RCLASS_CONST_TBL(orig), clone_const_i, &arg); + rb_id_table_foreach(orig_tbl, clone_const_i, &arg); RCLASS_WRITE_CONST_TBL(clone, const_tbl, false); } } |
