summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--parse.y2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f3b87b5..af0b801 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Jan 7 15:40:07 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * parse.y (singleton): get rid of segfault on syntax error.
+ fixed: [ruby-core:07070]
+
Sun Jan 1 17:07:59 2006 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
* win32/win32.c (rb_w32_seekdir): should not segfault even if passed
diff --git a/parse.y b/parse.y
index 0fc91b0..bd20398 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 {