diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | enumerator.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Fri Dec 21 08:07:35 2007 Yukihiro Matsumoto <matz@ruby-lang.org> + + * enumerator.c (enumerator_next): should call next_init() if fiber + is dead already. [ruby-dev:32459] + Fri Dec 21 01:21:49 2007 GOTOU Yuuzou <gotoyuzo@notwork.org> * ext/openssl/lib/openssl/ssl.rb (OpenSSL::SSL::SSLContext.build): diff --git a/enumerator.c b/enumerator.c index e348e68aa0..366c64c28a 100644 --- a/enumerator.c +++ b/enumerator.c @@ -408,7 +408,7 @@ enumerator_next(VALUE obj) VALUE curr, v; curr = rb_fiber_current(); - if (!e->fib) { + if (!e->fib || !rb_fiber_alive_p(e->fib)) { next_init(obj, e); } |