Commit 48967805

48967805b2c3Merged

Yukihiro "Matz" Matsumoto <[email protected]> · 7 months ago · 1 file · ~1 modified

Description

fix: sudoku splat detection, remaining arithmetic fixes

  • Fix splat/rest parameter detection: only create splat array when total positional args exceed total params, not per-param remaining count (fixes sudoku where int_array params were incorrectly splatted)
  • Fixes sudoku benchmark

Co-Authored-By: Claude Opus 4.6 (1M context) [email protected]

Details

Commit
48967805b2c3
Parent
74fadf13c3d1

spinel_codegen.rbmodifiedView file

@@ -8945,9 +8945,9 @@
89458945 if kw_found == 0
89468946 if k < ptypes.length
89478947 if ptypes[k] == "int_array"
8948- # Only splat if there are more positional args than remaining params
8948+ # Only splat if there are more positional args than total params
89498949 # (i.e., this is a rest/splat parameter, not a regular array param)
8950- if positional_ids.length > (pnames.length - k)
8950+ if positional_ids.length > pnames.length
89518951 @needs_int_array = 1
89528952 @needs_gc = 1
89538953 tmp = new_temp