summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-20 01:43:35 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-20 01:43:35 +0000
commitd325d74174c3ffffa0d75e248897cbb1aae93407 (patch)
tree31677137215377d45109e0e76b40b4aeeabc4a01 /parse.y
parentb06bcff42d664a5b14318226876ddb5580d2d348 (diff)
parse.y: fix block passing with empty kwargs
* parse.y (arg_blk_pass): preceeding arguments node may be NULL when an empty keyword argument hash splat is optimized away. [ruby-core:88890] [Bug #15087] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y1
1 files changed, 1 insertions, 0 deletions
diff --git a/parse.y b/parse.y
index fb471803a5..3763dabf3a 100644
--- a/parse.y
+++ b/parse.y
@@ -9962,6 +9962,7 @@ static NODE *
arg_blk_pass(NODE *node1, NODE *node2)
{
if (node2) {
+ if (!node1) return node2;
node2->nd_head = node1;
nd_set_first_lineno(node2, nd_first_lineno(node1));
nd_set_first_column(node2, nd_first_column(node1));