mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* parse.y (reduce_nodes_gen): NODE_RETURN in rescue body must not be
reduced when there is an else clause. This caused bizarre behavior in [Bug #4473] [ruby-core:35629] [ruby-core:37884]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d22e08f937
commit
b0f115da1a
2 changed files with 10 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
Sun Jul 10 11:35:29 2011 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* parse.y (reduce_nodes_gen): NODE_RETURN in rescue body must not be
|
||||
reduced when there is an else clause. This caused bizarre behavior
|
||||
in [Bug #4473] [ruby-core:35629] [ruby-core:37884].
|
||||
|
||||
Sun Jul 10 09:46:14 2011 Masaya Tarui <tarui@ruby-lnag.org>
|
||||
|
||||
* range.c (range_max): fix behavior with excluded end value.
|
||||
|
|
4
parse.y
4
parse.y
|
@ -8713,6 +8713,10 @@ reduce_nodes_gen(struct parser_params *parser, NODE **body)
|
|||
if (!subnodes(nd_head, nd_resq)) goto end;
|
||||
break;
|
||||
case NODE_RESCUE:
|
||||
if (node->nd_else) {
|
||||
body = &node->nd_resq;
|
||||
break;
|
||||
}
|
||||
if (!subnodes(nd_head, nd_resq)) goto end;
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue