mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
64886fd965
Refactor mrb_ary_sample to use mrb_alloca for the 'idx' array. This ensures that the memory is automatically freed when the C function returns, preventing a memory leak if an exception is raised during array manipulation. Co-authored-by: Gemini <gemini@google.com>