summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-02-02 05:45:21 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-02-02 05:45:21 +0000
commit6bff3ce39496144ac5fca630ad4ab579220a61dc (patch)
tree4a6fbbe62f1dada4c00d51ff752d42afdd96919c
parent57b6d6032cc57aec145ba7e1c6052ece11e8baeb (diff)
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
-rw-r--r--compile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/compile.c b/compile.c
index 6886c1ec7d6..63eba938498 100644
--- a/compile.c
+++ b/compile.c
@@ -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;
}