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

ruby-changes:42469

From: ko1 <ko1@a...>
Date: Mon, 11 Apr 2016 19:23:24 +0900 (JST)
Subject: [ruby-changes:42469] ko1:r54543 (trunk): * vm_backtrace.c (frame2klass): filter only for imemo_ment.

ko1	2016-04-11 20:19:52 +0900 (Mon, 11 Apr 2016)

  New Revision: 54543

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

  Log:
    * vm_backtrace.c (frame2klass): filter only for imemo_ment.
      T_IMEMO/imemo_iseq can be passed here.

  Modified files:
    trunk/ChangeLog
    trunk/vm_backtrace.c
Index: vm_backtrace.c
===================================================================
--- vm_backtrace.c	(revision 54542)
+++ vm_backtrace.c	(revision 54543)
@@ -1344,12 +1344,12 @@ frame2klass(VALUE frame) https://github.com/ruby/ruby/blob/trunk/vm_backtrace.c#L1344
 
     if (RB_TYPE_P(frame, T_IMEMO)) {
 	const rb_callable_method_entry_t *cme = (rb_callable_method_entry_t *)frame;
-	VM_ASSERT(imemo_type(frame) == imemo_ment);
-	return cme->defined_class;
-    }
-    else {
-	return Qnil;
+
+	if (imemo_type(frame) == imemo_ment) {
+	    return cme->defined_class;
+	}
     }
+    return Qnil;
 }
 
 VALUE
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 54542)
+++ ChangeLog	(revision 54543)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Apr 11 20:18:43 2016  Koichi Sasada  <ko1@a...>
+
+	* vm_backtrace.c (frame2klass): filter only for imemo_ment.
+	  T_IMEMO/imemo_iseq can be passed here.
+
 Mon Apr 11 17:43:04 2016  Nobuyoshi Nakada  <nobu@r...>
 
 	* compile.c (iseq_optimize): disable tail call optimization in

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

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