summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-06-21 15:36:06 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-06-21 15:36:06 +0000
commit4adfd770e62aea26e36154b27fac95d50b3ab1d6 (patch)
tree5e27602804e97f5c59cd0d161a13bebb37508b12
parentcc1e0c834890b7532f84f2cb40733828d38c4b21 (diff)
downloadruby-4adfd770e62aea26e36154b27fac95d50b3ab1d6.tar.gz
ruby-4adfd770e62aea26e36154b27fac95d50b3ab1d6.tar.xz
ruby-4adfd770e62aea26e36154b27fac95d50b3ab1d6.zip
* eval.c (proc_invoke): should not propagate distination tag if
tag is already handled in this level. (ruby-bugs-ja PR#501) git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog3
-rw-r--r--eval.c6
2 files changed, 5 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index a54e47985..07b1b1d3a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
Sat Jun 21 23:15:08 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * eval.c (proc_invoke): should not propagate distination tag if
+ tag is already handled in this level. (ruby-bugs-ja PR#501)
+
* object.c (str_to_id): check for empty string before intern.
[ruby-talk:74006]
diff --git a/eval.c b/eval.c
index c4cd1ac05..5746d60d8 100644
--- a/eval.c
+++ b/eval.c
@@ -7000,13 +7000,11 @@ proc_invoke(proc, args, self, klass)
state == TAG_BREAK ? "break" : "return");
localjump_error(mesg, prot_tag->retval, state);
}
- else {
+ else if (state == incoming_state) {
ruby_block->tag->dst = incoming_state;
- JUMP_TAG(incoming_state);
}
- break;
default:
- JUMP_TAG(incoming_state);
+ JUMP_TAG(state);
}
return result;
}