summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-07-14 14:22:11 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-07-14 14:22:11 +0000
commit6e918be6b182ac121412bdd53c78ec1b54b14593 (patch)
treeec2f7c5a884c4f259f7b4971e9ce5664952d35aa /parse.y
parent91c9ac216a7db83890e5e6ff7e90d50ce9fd1e35 (diff)
* gc.c, parse.y, lib/cgi.rb, lib/date.rb: last minute backports from HEAD.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y9
1 files changed, 4 insertions, 5 deletions
diff --git a/parse.y b/parse.y
index 9f01320..8fa177a 100644
--- a/parse.y
+++ b/parse.y
@@ -5266,11 +5266,10 @@ static NODE*
cond0(node)
NODE *node;
{
- enum node_type type = nd_type(node);
-
+ if (node == 0) return 0;
assign_in_cond(node);
- switch (type) {
+ switch (nd_type(node)) {
case NODE_DSTR:
case NODE_EVSTR:
case NODE_STR:
@@ -5294,8 +5293,8 @@ cond0(node)
case NODE_DOT3:
node->nd_beg = range_op(node->nd_beg);
node->nd_end = range_op(node->nd_end);
- if (type == NODE_DOT2) nd_set_type(node,NODE_FLIP2);
- else if (type == NODE_DOT3) nd_set_type(node, NODE_FLIP3);
+ if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2);
+ else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3);
node->nd_cnt = local_append(internal_id());
if (!e_option_supplied()) {
int b = literal_node(node->nd_beg);