summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-12-18 09:46:21 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-12-18 09:46:21 +0000
commit117b7d5c47f31b02cf891c792f919afceaddd080 (patch)
treed927327cf133d6c690b582751a5e535fb48c0495 /parse.y
parent652f744cba955435d0c69f17fa42c3c7b88bcbe9 (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y8
1 files changed, 6 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index d77e04d381..6dbb364c55 100644
--- a/parse.y
+++ b/parse.y
@@ -1203,14 +1203,18 @@ primary : literal
$$ = NEW_UNTIL(cond($3), $6, 1);
fixpos($$, $3);
}
- | kCASE compstmt
+ | kCASE expr opt_terms
case_body
kEND
{
value_expr($2);
- $$ = NEW_CASE($2, $3);
+ $$ = NEW_CASE($2, $4);
fixpos($$, $2);
}
+ | kCASE opt_terms case_body kEND
+ {
+ $$ = $3;
+ }
| kFOR block_var kIN {COND_PUSH;} expr do {COND_POP;}
compstmt
kEND