Commit f9015efe

f9015efe1332Merged

Yukihiro "Matz" Matsumoto <[email protected]> · 5 months ago · 2 files · ~2 modified

Description

Exception#backtrace returns an empty array

spinel does not capture stack frames, so backtrace yields an empty str_array (inspect -> "[]", empty? -> true) instead of falling through to the unresolved-call error.

Co-Authored-By: Claude Opus 4.8 [email protected]

Details

Commit
f9015efe1332
Parent
9ec2e6bfb6da

src/analyze.cmodifiedView file

@@ -578,6 +578,7 @@
578578 if (!strcmp(name, "message") || !strcmp(name, "to_s") ||
579579 !strcmp(name, "to_str") || !strcmp(name, "inspect") ||
580580 !strcmp(name, "full_message") || !strcmp(name, "class")) return TY_STRING;
581+ if (!strcmp(name, "backtrace")) return TY_STR_ARRAY; /* empty: no frames captured */
581582 }
582583
583584 /* poly receiver / poly operand: result type of operations on sp_RbVal */