Skip to content

Commit 497b19c

Browse files
committed
Support the case when the backtrace is not an array.
1 parent a1ea2a6 commit 497b19c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/error.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ exc_get_backtrace(mrb_state *mrb, mrb_value exc)
174174

175175
attr_name = mrb_intern_lit(mrb, "backtrace");
176176
backtrace = mrb_iv_get(mrb, exc, attr_name);
177-
if (mrb_nil_p(backtrace)) {
177+
if (!mrb_array_p(backtrace)) {
178178
if (mrb_obj_ptr(exc) == mrb->backtrace.exc && mrb->backtrace.n > 0) {
179179
backtrace = mrb_restore_backtrace(mrb);
180180
mrb->backtrace.n = 0;

0 commit comments

Comments
 (0)