compile.c: keyword table for required kwarg
* compile.c (iseq_build_kw): keyword table is necessary also when required keyword argumetns only. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
57b6d6032c
commit
6bff3ce394
@ -6864,7 +6864,7 @@ iseq_build_kw(rb_iseq_t *iseq, VALUE params, VALUE keywords)
|
||||
#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 params, VALUE keywords)
|
||||
default_values: /* note: we intentionally preserve `i' from previous loop */
|
||||
default_len = len - i;
|
||||
if (default_len == 0) {
|
||||
keyword->table = ids;
|
||||
return keyword;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user