[前][次][番号順一覧][スレッド一覧]

ruby-changes:42001

From: nobu <ko1@a...>
Date: Thu, 10 Mar 2016 14:32:54 +0900 (JST)
Subject: [ruby-changes:42001] nobu:r54075 (trunk): thread.c: check type of coverage

nobu	2016-03-10 14:32:48 +0900 (Thu, 10 Mar 2016)

  New Revision: 54075

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54075

  Log:
    thread.c: check type of coverage
    
    * thread.c (update_coverage): check type of coverage array not
      only if non-zero.

  Modified files:
    trunk/thread.c
Index: thread.c
===================================================================
--- thread.c	(revision 54074)
+++ thread.c	(revision 54075)
@@ -4774,7 +4774,7 @@ static void https://github.com/ruby/ruby/blob/trunk/thread.c#L4774
 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) {

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]