diff options
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | eval.c | 4 |
2 files changed, 12 insertions, 2 deletions
@@ -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 @@ -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; |