mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* parse.y (primary): remove meaningless else-only case statement
syntax. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c7d9ba96cb
commit
b6630a375d
2 changed files with 5 additions and 16 deletions
|
@ -1,3 +1,8 @@
|
|||
Wed Jun 28 09:16:18 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* parse.y (primary): remove meaningless else-only case statement
|
||||
syntax.
|
||||
|
||||
Wed Jun 28 08:08:13 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* eval.c (rb_eval): problem to handle else part. [ruby-dev:28873]
|
||||
|
|
16
parse.y
16
parse.y
|
@ -2602,14 +2602,6 @@ primary : literal
|
|||
$$ = dispatch2(case, $2, $4);
|
||||
%*/
|
||||
}
|
||||
| keyword_case expr_value opt_terms keyword_else compstmt keyword_end
|
||||
{
|
||||
/*%%%*/
|
||||
$$ = block_append($2, $5);
|
||||
/*%
|
||||
$$ = dispatch2(case, $2, dispatch1(else, $5));
|
||||
%*/
|
||||
}
|
||||
| keyword_case opt_terms case_body keyword_end
|
||||
{
|
||||
/*%%%*/
|
||||
|
@ -2618,14 +2610,6 @@ primary : literal
|
|||
$$ = dispatch2(case, Qnil, $3);
|
||||
%*/
|
||||
}
|
||||
| keyword_case opt_terms keyword_else compstmt keyword_end
|
||||
{
|
||||
/*%%%*/
|
||||
$$ = $4;
|
||||
/*%
|
||||
$$ = dispatch2(case, Qnil, dispatch1(else, $4));
|
||||
%*/
|
||||
}
|
||||
| keyword_for for_var keyword_in {COND_PUSH(1);} expr_value do {COND_POP();}
|
||||
compstmt
|
||||
keyword_end
|
||||
|
|
Loading…
Add table
Reference in a new issue