Add missing write barrier in set_i_initialize_copy

When we copy the table from one set to another we need to run write
barriers.
This commit is contained in:
John Hawthorn 2025-06-08 12:17:53 -07:00
parent 4b80f56f60
commit c962735fe8
Notes: git 2025-06-09 17:07:00 +00:00
2 changed files with 7 additions and 0 deletions

1
set.c
View file

@ -528,6 +528,7 @@ set_i_initialize_copy(VALUE set, VALUE other)
set_free_embedded(sobj);
set_copy(&sobj->table, RSET_TABLE(other));
rb_gc_writebarrier_remember(set);
return set;
}