Skip to content

Commit

Permalink
Specify return value in st_insert_no_gc
Browse files Browse the repository at this point in the history
  • Loading branch information
rm155 committed Oct 22, 2024
1 parent e3a5540 commit c74c73c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion objspace_coordinator.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,8 +504,9 @@ int
st_insert_no_gc(st_table *tab, st_data_t key, st_data_t value)
{
VALUE already_disabled = rb_gc_disable_no_rest();
st_insert(tab, key, value);
int ret = st_insert(tab, key, value);
if (already_disabled == Qfalse) rb_gc_enable();
return ret;
}

static void *
Expand Down

0 comments on commit c74c73c

Please sign in to comment.