add assert on SP

This commit is contained in:
Aaron Patterson 2024-01-18 12:35:52 -08:00 committed by Aaron Patterson
parent 400341aee9
commit 200d3cc14d

View File

@ -2855,6 +2855,7 @@ iseq_set_exception_table(rb_iseq_t *iseq)
if (entry->type == CATCH_TYPE_RESCUE ||
entry->type == CATCH_TYPE_BREAK ||
entry->type == CATCH_TYPE_NEXT) {
RUBY_ASSERT(entry->sp > 0);
entry->sp--;
}
}