summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-12 06:35:02 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-12 06:35:02 +0000
commitee725321b693a1835957f3f6175ad77b5d2a9064 (patch)
tree912fdad22b2bcbd79fb8f11672883b320c217629 /parse.y
parente40ab5942b9577847c6b3203221916ddcee1cd83 (diff)
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.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index 18116f22af..7e85d70c1e 100644
--- a/parse.y
+++ b/parse.y
@@ -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, $$);
}
/*%