aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--enumerator.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f2352eca86..bc567f53a7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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);
}