diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-04-12 06:35:02 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-04-12 06:35:02 +0000 |
commit | ee725321b693a1835957f3f6175ad77b5d2a9064 (patch) | |
tree | 912fdad22b2bcbd79fb8f11672883b320c217629 /parse.y | |
parent | e40ab5942b9577847c6b3203221916ddcee1cd83 (diff) | |
download | ruby-ee725321b693a1835957f3f6175ad77b5d2a9064.tar.gz |
parse.y: null by syntax error
* 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/trunk@50265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2103,7 +2103,7 @@ arg : lhs '=' arg value_expr($3); $$ = NEW_DOT2($1, $3); if ($1 && nd_type($1) == NODE_LIT && FIXNUM_P($1->nd_lit) && - nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) { + $3 && nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) { deferred_nodes = list_append(deferred_nodes, $$); } /*% @@ -2117,7 +2117,7 @@ arg : lhs '=' arg value_expr($3); $$ = NEW_DOT3($1, $3); if ($1 && nd_type($1) == NODE_LIT && FIXNUM_P($1->nd_lit) && - nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) { + $3 && nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) { deferred_nodes = list_append(deferred_nodes, $$); } /*% |