* 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
This commit is contained in:
nobu 2005-08-13 09:52:06 +00:00
parent 96d7c07e49
commit 3b602c7a74
2 changed files with 12 additions and 2 deletions

View File

@ -1,4 +1,12 @@
Sat Aug 13 18:35:27 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
Sat Aug 13 18:51:26 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
* eval.c (rb_block_pass): distinguish current block from others.
fixed: [ruby-dev:26274]
Sat Aug 13 18:51:25 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
* eval.c (rb_block_pass): distinguish current block from others.
fixed: [ruby-dev:26274]
* ext/stringio/stringio.c (strio_set_string): disallow nil.
http://www.rubyist.net/~nobu/t/20050811.html#c05

4
eval.c
View File

@ -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;