Skip to content

Commit ade2b51

Browse files
committed
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.
1 parent 50c97e1 commit ade2b51

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

ext/coverage/coverage.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,6 @@ rb_coverage_peek_result(VALUE klass)
352352
if (!RTEST(coverages)) {
353353
rb_raise(rb_eRuntimeError, "coverage measurement is not enabled");
354354
}
355-
OBJ_WB_UNPROTECT(coverages);
356355

357356
rb_hash_foreach(coverages, coverage_peek_result_i, ncoverages);
358357

0 commit comments

Comments
 (0)