class.c: skip keyword argument hash duplication in mrb_get_args()

Same reasoning as the vm.c change - the keyword hash arriving at
C functions via mrb_get_args() is always freshly constructed at the
call site, so duplication is unnecessary.

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Yukihiro "Matz" Matsumoto
2026-02-10 23:01:11 +09:00
parent 914d64ef0c
commit 5970e3508e
+1 -1
View File
@@ -1633,7 +1633,7 @@ get_args_v(mrb_state *mrb, mrb_args_format format, void** ptr, va_list *ap)
case ':':
{
mrb_value ksrc = mrb_hash_p(kdict) ? mrb_hash_dup(mrb, kdict) : mrb_hash_new(mrb);
mrb_value ksrc = mrb_hash_p(kdict) ? kdict : mrb_hash_new(mrb);
const mrb_kwargs *kwargs = GET_ARG(const mrb_kwargs*);
mrb_value *rest;