summaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-11-09 15:07:14 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-11-09 15:07:14 +0000
commit0013ded1b587bd20d82b338c6cb552aabdbe624e (patch)
tree874a7e4c21ad02d70f1fa6e78ca7de2a9a8c1c5c /parse.y
parentd625e7f8519520321e213899ad6903356add49b3 (diff)
downloadruby-0013ded1b587bd20d82b338c6cb552aabdbe624e.tar.gz
ruby-0013ded1b587bd20d82b338c6cb552aabdbe624e.tar.xz
ruby-0013ded1b587bd20d82b338c6cb552aabdbe624e.zip
* parse.y (primary): primary_value may be 0 when syntax error.
[ruby-talk:84893] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index 6098e96ca..c37a5bea7 100644
--- a/parse.y
+++ b/parse.y
@@ -1445,7 +1445,7 @@ primary : literal
}
| primary_value '[' aref_args ']'
{
- if (nd_type($1) == NODE_SELF)
+ if ($1 && nd_type($1) == NODE_SELF)
$$ = NEW_FCALL(tAREF, $3);
else
$$ = NEW_CALL($1, tAREF, $3);