summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--parse.y5
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 20e360f8cf1..b92ab28e72e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed Jun 30 11:38:51 2004 Elven <elven@elven.de>
+
+ * parse.y (primary): should not be NULL. [ruby-core:03098]
+
Wed Jun 30 02:41:10 2004 why the lucky stiff <why@ruby-lang.org>
* ext/syck/rubyext.c (syck_emitter_new): set buffer after
diff --git a/parse.y b/parse.y
index ff8cc62e55a..6a68ef2ca24 100644
--- a/parse.y
+++ b/parse.y
@@ -1448,7 +1448,10 @@ primary : literal
bodystmt
kEND
{
- $$ = NEW_BEGIN($3);
+ if ($3 == NULL)
+ $$ = NEW_NIL();
+ else
+ $$ = NEW_BEGIN($3);
nd_set_line($$, $<num>1);
}
| tLPAREN_ARG expr {lex_state = EXPR_ENDARG;} rparen