summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-26 06:50:12 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-26 06:50:12 +0000
commit43b1b0e16a6ced5ba337a0f3f120f5d21f9abf8d (patch)
tree70bdbc5583045ed532ac10660f1c0e467cf25c32
parentfbee9ba6ea90e881a3341caaa2114df4f5aa16d9 (diff)
* parse.y (value_expr_gen): removed inappropriate warning.
[ruby-core:15660] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--parse.y8
2 files changed, 13 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 31a99b0e011..a26cf17c6b1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Feb 26 15:50:10 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * parse.y (value_expr_gen): removed inappropriate warning.
+ [ruby-core:15660]
+
Tue Feb 26 15:43:42 2008 Tanaka Akira <akr@fsij.org>
* parse.y (tokadd_escape): refactored. [ruby-core:15657]
diff --git a/parse.y b/parse.y
index 886457823ff..6a8375d04e4 100644
--- a/parse.y
+++ b/parse.y
@@ -7902,6 +7902,14 @@ value_expr_gen(struct parser_params *parser, NODE *node)
break;
case NODE_IF:
+ if (!node->nd_body) {
+ node = node->nd_else;
+ break;
+ }
+ else if (!node->nd_else) {
+ node = node->nd_body;
+ break;
+ }
if (!value_expr(node->nd_body)) return Qfalse;
node = node->nd_else;
break;