* eval.c (rb_call): should not set prot_tag->blkid since it would

never catch breaks at this level.  [ruby-dev:28922]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2006-07-04 06:22:11 +00:00
parent ba5a0701e4
commit 6243e40920
2 changed files with 16 additions and 7 deletions

View File

@ -1,3 +1,8 @@
Tue Jul 4 15:12:49 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (rb_call): should not set prot_tag->blkid since it would
never catch breaks at this level. [ruby-dev:28922]
Tue Jul 4 04:48:36 2006 Yukihiro Matsumoto <matz@ruby-lang.org> Tue Jul 4 04:48:36 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* bignum.c: ruby 1.9 HEAD 64 bit warnings clean up from * bignum.c: ruby 1.9 HEAD 64 bit warnings clean up from

18
eval.c
View File

@ -785,10 +785,14 @@ static unsigned long block_unique = 1;
_block.dyna_vars = ruby_dyna_vars; \ _block.dyna_vars = ruby_dyna_vars; \
_block.wrapper = ruby_wrapper; \ _block.wrapper = ruby_wrapper; \
_block.block_obj = 0; \ _block.block_obj = 0; \
_block.uniq = (b)?block_unique++:0; \
if (b) { \ if (b) { \
_block.uniq = block_unique++; \
prot_tag->blkid = _block.uniq; \ prot_tag->blkid = _block.uniq; \
} \ } \
else { \
_block.uniq = 0; \
prot_tag->blkid = 0; \
} \
(v) = &_block (v) = &_block
#define POP_BLOCK() } while (0) #define POP_BLOCK() } while (0)
@ -5915,15 +5919,15 @@ rb_call(VALUE klass, VALUE recv, ID mid,
int state; int state;
PUSH_TAG(PROT_LOOP); PUSH_TAG(PROT_LOOP);
prot_tag->blkid = block->uniq; // prot_tag->blkid = block->uniq;
state = EXEC_TAG(); state = EXEC_TAG();
if (state == 0) { if (state == 0) {
result = rb_call0(klass, recv, mid, id, argc, argv, block, body, noex); result = rb_call0(klass, recv, mid, id, argc, argv, block, body, noex);
} }
else if (state == TAG_BREAK && TAG_DST()) { // else if (state == TAG_BREAK && TAG_DST()) {
result = prot_tag->retval; // result = prot_tag->retval;
state = 0; // state = 0;
} // }
POP_TAG(); POP_TAG();
if (state) JUMP_TAG(state); if (state) JUMP_TAG(state);
return result; return result;
@ -8750,7 +8754,7 @@ passing_block(VALUE proc, struct BLOCK *blockp)
if (!orphan) return data; if (!orphan) return data;
*blockp = *data; *blockp = *data;
if (orphan) blockp->uniq = block_unique++; blockp->uniq = block_unique++;
return blockp; return blockp;
} }