1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* eval.c (rb_eval): should not handle exceptions within rescue

argument.  [ruby-talk:80804]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2003-09-02 00:51:39 +00:00
parent 37ddebafeb
commit 645d4abf42
2 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Tue Sep 2 09:51:36 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
* eval.c (rb_eval): should not handle exceptions within rescue
argument. [ruby-talk:80804]
Tue Sep 2 00:44:37 2003 Nobuyoshi Nakada <nobu@ruby-lang.org> Tue Sep 2 00:44:37 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
* re.c (rb_memsearch): fix overrun. [ruby-talk:80759] * re.c (rb_memsearch): fix overrun. [ruby-talk:80759]

6
eval.c
View file

@ -2782,7 +2782,10 @@ rb_eval(self, n)
result = rb_eval(self, node->nd_head); result = rb_eval(self, node->nd_head);
} }
else if (rescuing) { else if (rescuing) {
if (state == TAG_RETRY) { if (rescuing < 0) {
/* in rescue argument, just reraise */
}
else if (state == TAG_RETRY) {
rescuing = state = 0; rescuing = state = 0;
e_info = ruby_errinfo = Qnil; e_info = ruby_errinfo = Qnil;
result = rb_eval(self, node->nd_head); result = rb_eval(self, node->nd_head);
@ -2794,6 +2797,7 @@ rb_eval(self, n)
else if (state == TAG_RAISE) { else if (state == TAG_RAISE) {
NODE *resq = node->nd_resq; NODE *resq = node->nd_resq;
rescuing = -1;
while (resq) { while (resq) {
ruby_current_node = resq; ruby_current_node = resq;
if (handle_rescue(self, resq)) { if (handle_rescue(self, resq)) {