thread.c: Clear an array for method coverage

* thread.c (reset_coverage_i): Clear an
  array for method coverage just like
  line coverage and branch coverage.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
yui-knk 2017-09-18 05:17:21 +00:00
Родитель 5d988300b2
Коммит 9d899615d1
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -5060,8 +5060,10 @@ reset_coverage_i(st_data_t key, st_data_t val, st_data_t dummy)
VALUE coverage = (VALUE)val;
VALUE lines = RARRAY_AREF(coverage, COVERAGE_INDEX_LINES);
VALUE branches = RARRAY_AREF(coverage, COVERAGE_INDEX_BRANCHES);
VALUE methods = RARRAY_AREF(coverage, COVERAGE_INDEX_METHODS);
if (lines) rb_ary_clear(lines);
if (branches) rb_ary_clear(branches);
if (methods) rb_ary_clear(methods);
return ST_CONTINUE;
}