From ade2b51a3b3ccdd9fe97d541c3dbb51339838d44 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Tue, 11 Nov 2025 10:00:10 -0500 Subject: [PATCH] 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. --- ext/coverage/coverage.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ext/coverage/coverage.c b/ext/coverage/coverage.c index 1519b559cd..74d9f3ea46 100644 --- a/ext/coverage/coverage.c +++ b/ext/coverage/coverage.c @@ -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);