diff options
| author | John Hawthorn <john@hawthorn.email> | 2025-06-07 22:23:52 -0700 |
|---|---|---|
| committer | Takashi Kokubun <takashikkbn@gmail.com> | 2026-05-05 13:27:43 -0700 |
| commit | 642798eeca806c999332ed3d02ed57a7852f7f1f (patch) | |
| tree | fa543bd2f6739e163e109088e495535e95fc1c2e | |
| parent | 1ce2e79b13733f1f2d2bbc2fa9f2b447f6ddd207 (diff) | |
Add write barriers on Hash#rehash
| -rw-r--r-- | hash.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1939,6 +1939,9 @@ rb_hash_rehash_i(VALUE key, VALUE value, VALUE arg) else { st_insert(RHASH_ST_TABLE(arg), (st_data_t)key, (st_data_t)value); } + + RB_OBJ_WRITTEN(arg, Qundef, key); + RB_OBJ_WRITTEN(arg, Qundef, value); return ST_CONTINUE; } |
