We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5f60538 commit 1e84614Copy full SHA for 1e84614
βhash.cβ
@@ -1288,15 +1288,14 @@ rb_hash_transient_heap_evacuate(VALUE hash, int promote)
1288
return;
1289
}
1290
HASH_ASSERT(old_tab != NULL);
1291
+ if (! promote) {
1292
+ new_tab = rb_transient_heap_alloc(hash, sizeof(ar_table));
1293
+ if (new_tab == NULL) promote = true;
1294
+ }
1295
if (promote) {
- promote:
1296
new_tab = ruby_xmalloc(sizeof(ar_table));
1297
RHASH_UNSET_TRANSIENT_FLAG(hash);
1298
- else {
- new_tab = rb_transient_heap_alloc(hash, sizeof(ar_table));
- if (new_tab == NULL) goto promote;
1299
- }
1300
*new_tab = *old_tab;
1301
hash_ar_table_set(hash, new_tab);
1302
0 commit comments