mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
3dbf5f6e27
The previous IO.popen capture of mrbc stdout (`-o-`) is vulnerable to a Windows MinGW race: with parallel rake (-m), stdout pipe inheritance can allow unrelated `_pp` build-progress messages from sibling worker threads to leak into the captured pipe content, corrupting the generated C file (recently seen as `CC build/...` text inside gem_test.c, causing compile errors at unrelated lines). Switch to `mrbc -o <tmpfile>` so the output is materialised in a file before merging into the destination, fully isolating mrbc from the parent's STDOUT. Co-authored-by: Claude <noreply@anthropic.com>