summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-03-18 14:25:47 +0900
committerJeremy Evans <code@jeremyevans.net>2019-08-30 12:39:31 -0700
commit16c6984bb97409029e213154ac4f633ae04af3d8 (patch)
tree53839e4d596e4016320097530ff5d7fcf19d11e6 /parse.y
parentb0a291f6f6a5834fd84807eb48be906ade429871 (diff)
Separate keyword arguments from positional arguments
And, allow non-symbol keys as a keyword arugment
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2395
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y12
1 files changed, 1 insertions, 11 deletions
diff --git a/parse.y b/parse.y
index 3c4a9d8a8a..4dfdd5d2a3 100644
--- a/parse.y
+++ b/parse.y
@@ -5134,12 +5134,6 @@ assocs : assoc
assocs = tail;
}
else if (tail) {
- if (assocs->nd_head &&
- !tail->nd_head && nd_type(tail->nd_next) == NODE_ARRAY &&
- nd_type(tail->nd_next->nd_head) == NODE_HASH) {
- /* DSTAR */
- tail = tail->nd_next->nd_head->nd_head;
- }
assocs = list_concat(assocs, tail);
}
$$ = assocs;
@@ -5177,11 +5171,7 @@ assoc : arg_value tASSOC arg_value
| tDSTAR arg_value
{
/*%%%*/
- if (nd_type($2) == NODE_HASH &&
- !($2->nd_head && $2->nd_head->nd_alen))
- $$ = 0;
- else
- $$ = list_append(p, NEW_LIST(0, &@$), $2);
+ $$ = list_append(p, NEW_LIST(0, &@$), $2);
/*% %*/
/*% ripper: assoc_splat!($2) %*/
}