ruby-changes:57747
From: Nobuyoshi <ko1@a...>
Date: Sat, 14 Sep 2019 21:12:32 +0900 (JST)
Subject: [ruby-changes:57747] f41cd4ba43 (master): Fixed one-off error
https://git.ruby-lang.org/ruby.git/commit/?id=f41cd4ba43 From f41cd4ba43771139dacf2c9d3e3ebd490a2619c0 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sat, 14 Sep 2019 21:09:39 +0900 Subject: Fixed one-off error Needs another room to append an empty hash. diff --git a/vm_eval.c b/vm_eval.c index ba57d90..f128e8d 100644 --- a/vm_eval.c +++ b/vm_eval.c @@ -243,7 +243,7 @@ add_empty_keyword(int *argc, const VALUE **argv, int *kw_splat) https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L243 int n = *argc; VALUE v; VALUE *ptr; - ptr = rb_alloc_tmp_buffer2(&v, n, sizeof(VALUE)); + ptr = rb_alloc_tmp_buffer2(&v, n+1, sizeof(VALUE)); memcpy(ptr, *argv, sizeof(VALUE)*n); ptr[n] = rb_hash_new(); *argc = ++n; -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/