1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

iseq.c: list of keywords [Fix GH-1056]

* iseq.c (rb_insn_operand_intern): change kw in callinfo disasm from the
  number of keyword arguments to an ordered list of the keywords used.
  [Feature #11589]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-10-14 05:11:44 +00:00
parent e21f1875b7
commit 4200ddd5d0
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,9 @@
Wed Oct 14 14:11:42 2015 Brian Black <bblack@veracode.com>
* iseq.c (rb_insn_operand_intern): change kw in callinfo disasm from the
number of keyword arguments to an ordered list of the keywords used.
[Feature #11589]
Wed Oct 14 13:58:44 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (parser_nextc): send a warning to ripper, not to STDERR

4
iseq.c
View file

@ -1292,7 +1292,9 @@ rb_insn_operand_intern(const rb_iseq_t *iseq,
rb_ary_push(ary, rb_sprintf("argc:%d", ci->orig_argc));
if (ci->flag & VM_CALL_KWARG) {
rb_ary_push(ary, rb_sprintf("kw:%d", ((struct rb_call_info_with_kwarg *)ci)->kw_arg->keyword_len));
struct rb_call_info_kw_arg *kw_args = ((struct rb_call_info_with_kwarg *)ci)->kw_arg;
VALUE kw_ary = rb_ary_new_from_values(kw_args->keyword_len, kw_args->keywords);
rb_ary_push(ary, rb_sprintf("kw:[%"PRIsVALUE"]", rb_ary_join(kw_ary, rb_str_new2(","))));
}
if (ci->flag) {