From 497b19ce22e2c48339695b8a9943c21db2f2a7dd Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Mon, 1 May 2017 19:16:16 +0900 Subject: Support the case when the backtrace is not an array. --- src/error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/error.c') diff --git a/src/error.c b/src/error.c index 13373d8f8..5bb547afe 100644 --- a/src/error.c +++ b/src/error.c @@ -174,7 +174,7 @@ exc_get_backtrace(mrb_state *mrb, mrb_value exc) attr_name = mrb_intern_lit(mrb, "backtrace"); backtrace = mrb_iv_get(mrb, exc, attr_name); - if (mrb_nil_p(backtrace)) { + if (!mrb_array_p(backtrace)) { if (mrb_obj_ptr(exc) == mrb->backtrace.exc && mrb->backtrace.n > 0) { backtrace = mrb_restore_backtrace(mrb); mrb->backtrace.n = 0; -- cgit v1.2.3