summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-01-07 06:41:24 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-01-07 06:41:24 +0000
commit8ce7782614815ebd9e887990127993f298e9c966 (patch)
treeeec9ee46a1376997dac58e0f007beda098783e6f /parse.y
parent9f982818d5897868e6644878da23a418b58ddd34 (diff)
* parse.y (singleton): get rid of segfault on syntax error.
fixed: [ruby-core:07070] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9803 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 0fc91b0d50..bd2039822c 100644
--- a/parse.y
+++ b/parse.y
@@ -2377,7 +2377,7 @@ opt_f_block_arg : ',' f_block_arg
singleton : var_ref
{
- if (nd_type($1) == NODE_SELF) {
+ if ($1 && nd_type($1) == NODE_SELF) {
$$ = NEW_SELF();
}
else {