summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--vm_backtrace.c10
2 files changed, 10 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 82b6081..a49612f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Apr 11 20:18:43 2016 Koichi Sasada <ko1@atdot.net>
+
+ * 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@ruby-lang.org>
* compile.c (iseq_optimize): disable tail call optimization in
diff --git a/vm_backtrace.c b/vm_backtrace.c
index bef61d8..31ca10f 100644
--- a/vm_backtrace.c
+++ b/vm_backtrace.c
@@ -1344,12 +1344,12 @@ frame2klass(VALUE frame)
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