diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-04-12 16:00:14 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-04-12 16:00:14 +0000 |
commit | 54eb4c1930f81998efe64661e1a6d82df915e9ba (patch) | |
tree | b614dd8d71f7f250d7f642b34a605200b6147a37 /parse.y | |
parent | 1cc6f36317558a48ccf05ff5758af0c4cd455b79 (diff) |
merge revision(s) 49964,50265: [Backport #11047] [Backport #10957]
* parse.y (primary): empty parentheses at cmdarg can be null.
[ruby-core:68477] [Bug #10957]
* parse.y (arg): fix segfault by null caused by syntax error.
[ruby-core:68851] [Bug #10957]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@50277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -2100,8 +2100,8 @@ arg : lhs '=' arg value_expr($1); value_expr($3); $$ = NEW_DOT2($1, $3); - if (nd_type($1) == NODE_LIT && FIXNUM_P($1->nd_lit) && - nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) { + if ($1 && nd_type($1) == NODE_LIT && FIXNUM_P($1->nd_lit) && + $3 && nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) { deferred_nodes = list_append(deferred_nodes, $$); } /*% @@ -2114,8 +2114,8 @@ arg : lhs '=' arg value_expr($1); value_expr($3); $$ = NEW_DOT3($1, $3); - if (nd_type($1) == NODE_LIT && FIXNUM_P($1->nd_lit) && - nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) { + if ($1 && nd_type($1) == NODE_LIT && FIXNUM_P($1->nd_lit) && + $3 && nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) { deferred_nodes = list_append(deferred_nodes, $$); } /*% |