Commit 87a2ba79
87a2ba791fa0Merged
Yukihiro "Matz" Matsumoto <[email protected]> · 6 months ago · 1 file · ~1 modified
Description
fix(codegen): default args at bare-receiver sibling cmeth call (#433)
Bare call to a sibling def self.X inside a module went through
compile_call_args, which doesn't append default values for omitted
trailing params. Explicit-receiver calls already routed through
compile_call_args_with_defaults; route the bare-receiver module
path through the same helper so def self.execute(sql, params = [])
called bare as execute("SELECT...") from a sibling cmeth fills
the missing trailing arg from the recorded default expression.
Closes #433
Co-Authored-By: Claude Opus 4.7 (1M context) [email protected]
Details
- Commit
- 87a2ba791fa0
- Parent
- 8710b3e87fbd
spinel_codegen.rbmodifiedView file
@@ -12593,7 +12593,7 @@
1259312593
synth = owning + "_cls_" + mname1259412594
mi = find_method_idx(synth)1259512595
if mi >= 012596-
ca_m = compile_call_args(nid)12596+
ca_m = compile_call_args_with_defaults(nid, mi)1259712597
if ca_m == ""1259812598
return "sp_" + sanitize_name(synth) + "()"1259912599
end