From 5970e3508e22af1f58baee0237bb7161900b644d Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Tue, 10 Feb 2026 23:01:11 +0900 Subject: [PATCH] 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 --- src/class.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/class.c b/src/class.c index 46695e1b2..722e06963 100644 --- a/src/class.c +++ b/src/class.c @@ -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;