Commit b080069
Address CodeRabbit minor finding on PR #5863: the guard excluding
digit-shaped keys from the Function.prototype descriptor fallback used
prop.as_bytes().first().is_ascii_digit(), which also excludes non-index
names like "1x" or "2things" — a user-defined Function.prototype property
with such a key would never be found through a closure receiver. Use the
canonical array-index helper so only true index keys ("0", "1", "42", ...)
are excluded.
Pre-existing behavior (this exact check predates this PR; only relocated
during the earlier dedup refactor), fixed here since it's directly
adjacent to code this PR already touches.
Verified: cargo test -p perry-runtime (1108 passed, 0 failed).
Co-authored-by: Ralph <ralph@skelpo.com>
1 parent 94e9bc7 commit b080069
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
543 | 543 | | |
544 | 544 | | |
545 | 545 | | |
546 | | - | |
| 546 | + | |
547 | 547 | | |
548 | 548 | | |
549 | 549 | | |
| |||
0 commit comments