diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-08-17 11:12:23 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-08-19 15:10:53 +0900 |
commit | 99093e1600ccef17ab99356b689573fcfd336ecc (patch) | |
tree | b0654845b92b038889fff4eab6e1c73b6ba8a4c0 /ext/coverage/coverage.c | |
parent | d2eeb836344406eff3342b86436cc7eb0f8cc908 (diff) | |
download | ruby-99093e1600ccef17ab99356b689573fcfd336ecc.tar.gz |
RHASH_TBL: is now ext-only
It seems almost no internal codes use RHASH_TBL any longer. Why not
just eliminate it entirely, so that the macro can be purely ext-only.
Diffstat (limited to 'ext/coverage/coverage.c')
-rw-r--r-- | ext/coverage/coverage.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/coverage/coverage.c b/ext/coverage/coverage.c index 49f7ffa0f8..5b29ea2aea 100644 --- a/ext/coverage/coverage.c +++ b/ext/coverage/coverage.c @@ -252,7 +252,8 @@ rb_coverage_peek_result(VALUE klass) if (!RTEST(coverages)) { rb_raise(rb_eRuntimeError, "coverage measurement is not enabled"); } - st_foreach(RHASH_TBL(coverages), coverage_peek_result_i, ncoverages); + OBJ_WB_UNPROTECT(coverages); + st_foreach(RHASH_TBL_RAW(coverages), coverage_peek_result_i, ncoverages); if (current_mode & COVERAGE_TARGET_METHODS) { rb_objspace_each_objects(method_coverage_i, &ncoverages); |