diff --git a/ChangeLog b/ChangeLog index afacc5cdf8..023ac4c54d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Jan 7 15:40:07 2006 Nobuyoshi Nakada + + * parse.y (singleton): get rid of segfault on syntax error. + fixed: [ruby-core:07070] + Sat Jan 7 06:24:18 2006 Tanaka Akira * eval.c (rb_fd_isset): compare the result of FD_ISSET with 0 to diff --git a/parse.y b/parse.y index f3a7a42f51..2b8af2f279 100644 --- a/parse.y +++ b/parse.y @@ -4246,7 +4246,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 {