summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-30 04:37:50 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-30 04:37:50 +0000
commitcf22db8d6910a428b2bb51b3c78c34b86d83bf74 (patch)
tree63337a17a4e86d48e6694d2860d2a5571fa4a738 /parse.y
parent22b8cc47eb999311bef34240dd8c4f6cfdda849c (diff)
* parse.y (logop): left may be NULL. [ruby-talk:84539]
* eval.c (rb_eval): NODE_CASE nd_head may be NULL. * eval.c (rb_eval): remove never occurred NODE_WHEN branch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y3
1 files changed, 1 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index 5c43cd8..6098e96 100644
--- a/parse.y
+++ b/parse.y
@@ -1821,7 +1821,6 @@ case_body : kWHEN when_args then
$$ = NEW_WHEN($2, $4, $5);
}
;
-
when_args : args
| args ',' tSTAR arg_value
{
@@ -5317,7 +5316,7 @@ logop(type, left, right)
NODE *left, *right;
{
value_expr(left);
- if (nd_type(left) == type) {
+ if (left && nd_type(left) == type) {
NODE *node = left, *second;
while ((second = node->nd_2nd) != 0 && nd_type(second) == type) {
node = second;