Commit 7f910a30
7f910a3027cdMerged
Daisuke Fujimura <[email protected]> · 7 months ago · 2 files · +1 added · ~1 modified
Description
Respect return value of Kernel#system
Details
- Commit
- 7f910a3027cd
- Parent
- b6bb784c010d
spinel_codegen.rbmodifiedView file
@@ -1437,6 +1437,9 @@
14371437
if mname == "print"14381438
return "void"14391439
end1440+
if mname == "system"1441+
return "bool"1442+
end14401443
14411444
# Constructor .new14421445
r = infer_constructor_type(nid, mname, recv)@@ -12618,6 +12621,11 @@
1261812621
end1261912622
return "0"1262012623
end12624+
if mname == "system"12625+
@needs_file_io = 112626+
@needs_system = 112627+
return "({ fflush(stdout); sp_last_status = system(" + compile_arg0(nid) + "); sp_last_status == 0; })"12628+
end1262112629
if mname == "__method__"1262212630
return "\"" + @current_method_name + "\""1262312631
endtest/bm_system_expr.rbaddedView file
Loading diff…