summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-01-29 06:12:56 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-01-29 06:12:56 +0000
commit35e5ddf6cf001cd57ac61453c347b40acf775f47 (patch)
tree234cf0e66fec833d8bbc43d41d0e56c1558f5072 /eval.c
parent2f0faf671dcf8eadebdd0e35a567ddb8bd95bcaa (diff)
* eval.c (block_pass): return from block jumps directory to
block invoker. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index e833b74..3292cc4 100644
--- a/eval.c
+++ b/eval.c
@@ -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;