diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-05-17 03:39:40 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-05-17 03:39:40 +0000 |
commit | 4621799d3d8345b44ae650b88be1ae19502bd85b (patch) | |
tree | 072af584d89f0d0082e577dfd70527f7812464e2 | |
parent | d05010f6a4c0ce0473b815d0c8c5f3839a37e541 (diff) | |
download | ruby-4621799d3d8345b44ae650b88be1ae19502bd85b.tar.gz |
vm.c: narrow variable scope
* vm.c (vm_exec): move escape_ep into exception block, since it is
updated every time entering the block.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | vm.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1190,7 +1190,6 @@ vm_exec(rb_thread_t *th) int state; VALUE result, err; VALUE initial = 0; - VALUE *volatile escape_ep = NULL; TH_PUSH_TAG(th); _tag.retval = Qnil; @@ -1210,6 +1209,7 @@ vm_exec(rb_thread_t *th) VALUE catch_iseqval; rb_control_frame_t *cfp; VALUE type; + VALUE *escape_ep; err = th->errinfo; @@ -1228,6 +1228,7 @@ vm_exec(rb_thread_t *th) cfp = th->cfp; epc = cfp->pc - cfp->iseq->iseq_encoded; + escape_ep = NULL; if (state == TAG_BREAK || state == TAG_RETURN) { escape_ep = GET_THROWOBJ_CATCH_POINT(err); |