summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-14 05:11:44 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-14 05:11:44 +0000
commit4200ddd5d06ea6931758a8e462ec91655d866465 (patch)
treedb7de33d348259946a0b8e4d1dca5634f5ec3816 /iseq.c
parente21f1875b770caed1dd04adaa1a0043d45cb59d7 (diff)
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
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/iseq.c b/iseq.c
index 3760589..f72bcd7 100644
--- a/iseq.c
+++ b/iseq.c
@@ -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) {