ruby-changes:45423
From: nobu <ko1@a...>
Date: Thu, 2 Feb 2017 14:45:24 +0900 (JST)
Subject: [ruby-changes:45423] nobu:r57496 (trunk): compile.c: keyword table for required kwarg
nobu 2017-02-02 14:45:21 +0900 (Thu, 02 Feb 2017) New Revision: 57496 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57496 Log: compile.c: keyword table for required kwarg * compile.c (iseq_build_kw): keyword table is necessary also when required keyword argumetns only. Modified files: trunk/compile.c Index: compile.c =================================================================== --- compile.c (revision 57495) +++ compile.c (revision 57496) @@ -6864,7 +6864,7 @@ iseq_build_kw(rb_iseq_t *iseq, VALUE par https://github.com/ruby/ruby/blob/trunk/compile.c#L6864 #define SYM(s) ID2SYM(rb_intern(#s)) (void)int_param(&keyword->bits_start, params, SYM(kwbits)); i = keyword->bits_start - keyword->num; - ids = (VALUE *)&iseq->body->local_table[i]; + ids = (ID *)&iseq->body->local_table[i]; #undef SYM /* required args */ @@ -6881,6 +6881,7 @@ iseq_build_kw(rb_iseq_t *iseq, VALUE par https://github.com/ruby/ruby/blob/trunk/compile.c#L6881 default_values: /* note: we intentionally preserve `i' from previous loop */ default_len = len - i; if (default_len == 0) { + keyword->table = ids; return keyword; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/