Don't GC unprotect hash in Coverage.peek_result

The call to unprotect the coverages hash was introduced in commit 99093e1
where we used the raw ST table and st_foreach. We now use rb_hash_foreach
which no longer requires GC unprotecting the coverages hash.
This commit is contained in:
Peter Zhu 2025-11-11 10:00:10 -05:00
parent 50c97e1c78
commit ade2b51a3b
Notes: git 2025-11-11 18:18:15 +00:00

View File

@ -352,7 +352,6 @@ rb_coverage_peek_result(VALUE klass)
if (!RTEST(coverages)) {
rb_raise(rb_eRuntimeError, "coverage measurement is not enabled");
}
OBJ_WB_UNPROTECT(coverages);
rb_hash_foreach(coverages, coverage_peek_result_i, ncoverages);