diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-04 21:57:35 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-04 21:57:35 +0000 |
| commit | ad2400854617cf537f632d93c7b8a539190d2efa (patch) | |
| tree | 817100f7c70afaec29b353a7debd29354c1703aa /eval.c | |
| parent | 2861192716318c9ec9a8e52cf8f8bcfa43934635 (diff) | |
| download | ruby-ad2400854617cf537f632d93c7b8a539190d2efa.tar.gz ruby-ad2400854617cf537f632d93c7b8a539190d2efa.tar.xz ruby-ad2400854617cf537f632d93c7b8a539190d2efa.zip | |
* dln.c (aix_loaderror): should not use member named 'errno' which
might be a macro (e.g. on AIX).
* io.c (read_all): do not depend on lseek position.
[ruby-dev:22026]
* eval.c (rb_eval): preserve $! value when retry happens in the
rescue clause. [ruby-talk:86697]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
| -rw-r--r-- | eval.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -2856,6 +2856,7 @@ rb_eval(self, n) PUSH_TAG(PROT_NONE); if ((state = EXEC_TAG()) == 0) { + retry_entry: result = rb_eval(self, node->nd_head); } else if (rescuing) { @@ -2864,11 +2865,10 @@ rb_eval(self, n) } else if (state == TAG_RETRY) { rescuing = state = 0; - e_info = ruby_errinfo = Qnil; - result = rb_eval(self, node->nd_head); + ruby_errinfo = e_info; + goto retry_entry; } else if (state != TAG_RAISE) { - ruby_errinfo = e_info; result = prot_tag->retval; } } @@ -2882,7 +2882,6 @@ rb_eval(self, n) state = 0; rescuing = 1; result = rb_eval(self, resq->nd_body); - ruby_errinfo = e_info; break; } resq = resq->nd_head; /* next rescue */ @@ -2892,6 +2891,7 @@ rb_eval(self, n) result = prot_tag->retval; } POP_TAG(); + if (state != TAG_RAISE) ruby_errinfo = e_info; if (state) { if (state == TAG_NEXT) prot_tag->retval = result; JUMP_TAG(state); |
