diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-02 05:45:21 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-02 05:45:21 +0000 |
commit | 7615ea4811461132d0e4cef38057dd99e9b7e83e (patch) | |
tree | 4a6fbbe62f1dada4c00d51ff752d42afdd96919c /compile.c | |
parent | d6a1662008885e4d9140cf13beeaafc2f78901e0 (diff) | |
download | ruby-7615ea4811461132d0e4cef38057dd99e9b7e83e.tar.gz |
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
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; } |