diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-11-26 15:33:40 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-11-26 21:57:00 +0900 |
commit | 497f13aea6bae0e2443f21b4eb35fee9df3424d7 (patch) | |
tree | 0130389f727c0dbb20e5910e9aa67fc2f6cff9d9 /parse.y | |
parent | 265b5382b21db28e52d0314ef47025f881dcbf0f (diff) |
Wrap `p_kw` in an array at `p_kwarg`
Not in `p_kw` itself, which makes key and variable/expr pair only
now.
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -4073,12 +4073,13 @@ p_kwargs : p_kwarg ',' p_kwrest ; p_kwarg : p_kw + /*% ripper[brace]: rb_ary_new_from_args(1, $1) %*/ | p_kwarg ',' p_kw { /*%%%*/ $$ = list_concat($1, $3); /*% %*/ - /*% ripper: rb_ary_concat($1, $3) %*/ + /*% ripper: rb_ary_push($1, $3) %*/ } ; @@ -4087,7 +4088,7 @@ p_kw : p_kw_label p_expr /*%%%*/ $$ = list_append(p, NEW_LIST(NEW_LIT(ID2SYM($1), &@$), &@$), $2); /*% %*/ - /*% ripper: rb_ary_new_from_args(1, rb_ary_new_from_args(2, get_value($1), get_value($2))) %*/ + /*% ripper: rb_ary_new_from_args(2, get_value($1), get_value($2)) %*/ } | p_kw_label { @@ -4098,7 +4099,7 @@ p_kw : p_kw_label p_expr /*%%%*/ $$ = list_append(p, NEW_LIST(NEW_LIT(ID2SYM($1), &@$), &@$), assignable(p, $1, 0, &@$)); /*% %*/ - /*% ripper: rb_ary_new_from_args(1, rb_ary_new_from_args(2, get_value($1), Qnil)) %*/ + /*% ripper: rb_ary_new_from_args(2, get_value($1), Qnil) %*/ } ; |