diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | eval.c | 18 |
2 files changed, 22 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Mon Jan 29 14:25:39 2001 Yukihiro Matsumoto <matz@ruby-lang.org> + + * eval.c (block_pass): return from block jumps directory to + block invoker. + Mon Jan 29 01:40:27 2001 Yukihiro Matsumoto <matz@ruby-lang.org> * string.c (str_independent): should not clear str->orig here. @@ -6333,7 +6333,23 @@ block_pass(self, node) POP_TAG(); POP_ITER(); if (_block.tag->dst == state) { - state &= TAG_MASK; + if (orphan) { + state &= TAG_MASK; + } + else { + struct BLOCK *ptr = old_block; + + while (ptr) { + if (ptr->scope == _block.scope) { + ptr->tag->dst = state; + break; + } + ptr = ptr->prev; + } + if (!ptr) { + state &= TAG_MASK; + } + } } ruby_block = old_block; ruby_safe_level = safe; |