diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-04-12 07:08:28 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-04-12 07:08:28 +0000 |
commit | cc3871f9dcd8f89d6e554f59ff02c67dde42fc37 (patch) | |
tree | 0d378498a41ec7d477273854f0379c176002fd9f /eval.c | |
parent | baeb828c03e96b1f78c296fe4e12602e57497401 (diff) |
* eval.c (rb_protect): restore cfp ([ruby-dev:30671]).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1390,16 +1390,20 @@ rb_protect(VALUE (*proc) (VALUE), VALUE data, int *state) { VALUE result = Qnil; /* OK */ int status; + rb_thread_t *th = GET_THREAD(); + rb_control_frame_t *cfp = th->cfp; PUSH_THREAD_TAG(); if ((status = EXEC_TAG()) == 0) { result = (*proc) (data); } POP_THREAD_TAG(); + if (state) { *state = status; } if (status != 0) { + th->cfp = cfp; return Qnil; } |