diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-20 23:33:32 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-20 23:33:32 +0000 |
| commit | 55e48daa9366aaf3344fc5dc803dfe94ef5fce61 (patch) | |
| tree | f5ff70f25d525ccd49b089fd3b00e343297d7fb1 | |
| parent | 1f540602432ee372484a2b7bab5c0af908a3d1e0 (diff) | |
| download | ruby-55e48daa9366aaf3344fc5dc803dfe94ef5fce61.tar.gz ruby-55e48daa9366aaf3344fc5dc803dfe94ef5fce61.tar.xz ruby-55e48daa9366aaf3344fc5dc803dfe94ef5fce61.zip | |
* enumerator.c (enumerator_next): should call next_init() if fiber
is dead already. [ruby-dev:32459]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -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 e348e68aa..366c64c28 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); } |
