From 4f33c0cc1131b0b5a91cae4b6e09bda46dd14009 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Thu, 6 Nov 2025 08:26:42 +0900 Subject: [PATCH] mruby-error: combine variable declaration with initialization --- mrbgems/mruby-error/test/exception.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mrbgems/mruby-error/test/exception.c b/mrbgems/mruby-error/test/exception.c index 4de0e9607..e5292bba2 100644 --- a/mrbgems/mruby-error/test/exception.c +++ b/mrbgems/mruby-error/test/exception.c @@ -12,9 +12,10 @@ static mrb_value run_protect(mrb_state *mrb, mrb_value self) { mrb_value b; - mrb_value ret[2]; - mrb_bool state; mrb_get_args(mrb, "&", &b); + + mrb_bool state; + mrb_value ret[2]; ret[0] = mrb_protect(mrb, protect_cb, b, &state); ret[1] = mrb_bool_value(state); return mrb_ary_new_from_values(mrb, 2, ret);