mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
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:
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
1
set.c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue