mruby-bin-mirb: fix uninitialized editor struct causing bintest failures

Zero-initialize the mirb_editor struct to prevent highlight.enabled
from containing garbage values when stdin is not a tty (e.g. in
bintest). Without this, ANSI color codes could be emitted in
non-interactive mode, breaking output string matching in tests.

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Yukihiro "Matz" Matsumoto
2026-02-10 15:14:53 +09:00
parent b3b8c0176f
commit c06a11912c
+2
View File
@@ -477,6 +477,8 @@ main(int argc, char **argv)
mirb_editor editor;
mirb_check_data check_data;
mrb_bool use_editor = FALSE;
memset(&editor, 0, sizeof(editor));
mrb_ccontext *cxt;
struct mrb_parser_state *parser;
mrb_state *mrb;