From cd725929d7241166733f2028cc71640b055ce267 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 1 Mar 2007 12:38:05 +0000 Subject: [PATCH] * parse.y (stmt, arg): should not omit lhs of OP_ASGN1 even if empty. [ruby-dev:30452] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ parse.y | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index e74403b4b4..6e8c8d569b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Mar 1 21:38:07 2007 Nobuyoshi Nakada + + * parse.y (stmt, arg): should not omit lhs of OP_ASGN1 even if + empty. [ruby-dev:30452] + Thu Mar 1 02:55:25 2007 Akinori MUSHA * ext/digest/digest.c (get_digest_base_metadata): Allow inheriting diff --git a/parse.y b/parse.y index 93ded14d6b..1fc7b4d8b9 100644 --- a/parse.y +++ b/parse.y @@ -996,6 +996,7 @@ stmt : keyword_alias fitem {lex_state = EXPR_FNAME;} fitem NODE *args = $3; value_expr($6); + if (!$3) $3 = NEW_ZARRAY(); args = arg_concat($6, $3); if ($5 == tOROP) { $5 = 0; @@ -1778,6 +1779,7 @@ arg : lhs '=' arg NODE *args; value_expr($6); + if (!$3) $3 = NEW_ZARRAY(); args = arg_concat($6, $3); if ($5 == tOROP) { $5 = 0;