diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-09-02 00:51:39 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-09-02 00:51:39 +0000 |
commit | 645d4abf426fb2ef4ae72d0d46c24607b71be3a8 (patch) | |
tree | 9ccb2dc5d735cb90bb6b43bd2b7d14ba3134e589 | |
parent | 37ddebafeb3a233c1847f2aa1cf2331e9c48f4ce (diff) | |
download | ruby-645d4abf426fb2ef4ae72d0d46c24607b71be3a8.tar.gz |
* 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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | eval.c | 6 |
2 files changed, 10 insertions, 1 deletions
@@ -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> * re.c (rb_memsearch): fix overrun. [ruby-talk:80759] @@ -2782,7 +2782,10 @@ rb_eval(self, n) result = rb_eval(self, node->nd_head); } else if (rescuing) { - if (state == TAG_RETRY) { + if (rescuing < 0) { + /* in rescue argument, just reraise */ + } + else if (state == TAG_RETRY) { rescuing = state = 0; e_info = ruby_errinfo = Qnil; result = rb_eval(self, node->nd_head); @@ -2794,6 +2797,7 @@ rb_eval(self, n) else if (state == TAG_RAISE) { NODE *resq = node->nd_resq; + rescuing = -1; while (resq) { ruby_current_node = resq; if (handle_rescue(self, resq)) { |