aboutsummaryrefslogtreecommitdiffstats
path: root/thread.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-10 05:32:48 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-10 05:32:48 +0000
commitc3900ff4a8179e7bc8bbd75e8970168a98e98ae4 (patch)
treea90900e041703af8f09a8b0cd2e4aedd3b9af33a /thread.c
parente266279acacf56381f6003688184d4f40fb2a5b6 (diff)
downloadruby-c3900ff4a8179e7bc8bbd75e8970168a98e98ae4.tar.gz
thread.c: check type of coverage
* thread.c (update_coverage): check type of coverage array not only if non-zero. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/thread.c b/thread.c
index bc43572a34..9d1e3fec60 100644
--- a/thread.c
+++ b/thread.c
@@ -4774,7 +4774,7 @@ static void
update_coverage(rb_event_flag_t event, VALUE proc, VALUE self, ID id, VALUE klass)
{
VALUE coverage = rb_iseq_coverage(GET_THREAD()->cfp->iseq);
- if (coverage && RBASIC(coverage)->klass == 0) {
+ if (RB_TYPE_P(coverage, T_ARRAY) && !RBASIC_CLASS(coverage)) {
long line = rb_sourceline() - 1;
long count;
if (RARRAY_AREF(coverage, line) == Qnil) {