summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-08-13 09:52:06 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-08-13 09:52:06 +0000
commit3b602c7a743bce3449b9e8441cb3d7bcf1bea70b (patch)
treea339377193725487071eb235f38430db901339a3 /eval.c
parent96d7c07e497e7be5296de10511788eb9aa3e114b (diff)
* eval.c (rb_block_pass): distinguish current block from others.
fixed: [ruby-dev:26274] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 0ce62fd3b7..99847df415 100644
--- a/eval.c
+++ b/eval.c
@@ -947,6 +947,7 @@ static struct iter *ruby_iter;
#define ITER_NOT 0
#define ITER_PRE 1
#define ITER_CUR 2
+#define ITER_PAS 3
#define PUSH_ITER(i) do { \
struct iter _iter; \
@@ -5818,6 +5819,7 @@ rb_call0(klass, recv, id, oid, argc, argv, body, nosuper)
switch (ruby_iter->iter) {
case ITER_PRE:
+ case ITER_PAS:
itr = ITER_CUR;
break;
case ITER_CUR:
@@ -8820,7 +8822,7 @@ rb_block_pass(func, arg, proc)
}
if (ruby_block && ruby_block->block_obj == proc) {
- PUSH_ITER(ITER_PRE);
+ PUSH_ITER(ITER_PAS);
result = (*func)(arg);
POP_ITER();
return result;