зеркало из https://github.com/github/ruby.git
Use rb_hash_foreach in coverage
Using RHASH_TBL_RAW is a private API, so we should use rb_hash_foreach rather than RHASH_TBL_RAW with st_foreach.
This commit is contained in:
Родитель
ea2fb7460e
Коммит
6bd3e8fbb2
|
@ -353,7 +353,8 @@ rb_coverage_peek_result(VALUE klass)
|
|||
rb_raise(rb_eRuntimeError, "coverage measurement is not enabled");
|
||||
}
|
||||
OBJ_WB_UNPROTECT(coverages);
|
||||
st_foreach(RHASH_TBL_RAW(coverages), coverage_peek_result_i, ncoverages);
|
||||
|
||||
rb_hash_foreach(coverages, coverage_peek_result_i, ncoverages);
|
||||
|
||||
if (current_mode & COVERAGE_TARGET_METHODS) {
|
||||
rb_objspace_each_objects(method_coverage_i, &ncoverages);
|
||||
|
|
Загрузка…
Ссылка в новой задаче