Commit 957b9814
957b98143ceeMerged
Yukihiro "Matz" Matsumoto <[email protected]> · 7 months ago · 1 file · ~1 modified
Description
feat: add String#concat with multiple arguments
Appends each argument in sequence to a mutable_str receiver. Previously << handled single-argument case; now concat(a, b, c) is supported as a mutating multi-append operation.
Co-Authored-By: Claude Opus 4.6 (1M context) [email protected]
Details
- Commit
- 957b98143cee
- Parent
- 525a45c6fb15
spinel_codegen.rbmodifiedView file
@@ -14757,6 +14757,20 @@
1475714757
emit(" sp_" + pfx + "_push(" + rc + ", sp_" + pfx + "_get(" + arg + ", " + tmp + "));")1475814758
return 11475914759
end14760+
if rt == "mutable_str"14761+
@needs_mutable_str = 114762+
rc = compile_expr(recv)14763+
args_id = @nd_arguments[nid]14764+
if args_id >= 014765+
aargs = get_args(args_id)14766+
ak = 014767+
while ak < aargs.length14768+
emit(" sp_String_append(" + rc + ", " + compile_expr(aargs[ak]) + ");")14769+
ak = ak + 114770+
end14771+
end14772+
return 114773+
end1476014774
end1476114775
end1476214776