mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
a3797173c2
set_init was overwriting set->set without freeing the existing khash table, causing a memory leak when initialize is called multiple times. Prevent double initialization by raising an exception in set_init, while allowing replace/dup semantics in set_init_copy by properly freeing old data before reinitializing. Co-authored-by: Claude <noreply@anthropic.com>