ruby-changes:58920
From: Nobuyoshi <ko1@a...>
Date: Tue, 26 Nov 2019 23:09:32 +0900 (JST)
Subject: [ruby-changes:58920] 497f13aea6 (master): Wrap `p_kw` in an array at `p_kwarg`
https://git.ruby-lang.org/ruby.git/commit/?id=497f13aea6 From 497f13aea6bae0e2443f21b4eb35fee9df3424d7 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Tue, 26 Nov 2019 15:33:40 +0900 Subject: Wrap `p_kw` in an array at `p_kwarg` Not in `p_kw` itself, which makes key and variable/expr pair only now. diff --git a/parse.y b/parse.y index 3e5e11b..154c76f 100644 --- a/parse.y +++ b/parse.y @@ -4073,12 +4073,13 @@ p_kwargs : p_kwarg ',' p_kwrest https://github.com/ruby/ruby/blob/trunk/parse.y#L4073 ; 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 https://github.com/ruby/ruby/blob/trunk/parse.y#L4088 /*%%%*/ $$ = 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 https://github.com/ruby/ruby/blob/trunk/parse.y#L4099 /*%%%*/ $$ = 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) %*/ } ; -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/