aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--cont.c6
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 599a3f47e2..3fa1b3e973 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Oct 16 08:40:04 2014 Eric Wong <e@80x24.org>
+
+ * cont.c (fiber_store): restore references to next_fib (fix typo)
+
Thu Oct 16 08:26:08 2014 Eric Wong <e@80x24.org>
* cont.c (fiber_store): remove references to nextfib
diff --git a/cont.c b/cont.c
index f5835ebab0..3c069e4945 100644
--- a/cont.c
+++ b/cont.c
@@ -1377,11 +1377,15 @@ fiber_store(rb_fiber_t *next_fib, rb_thread_t *th)
/* restored */
fib = th->fiber;
if (fib->cont.argc == -1) rb_exc_raise(fib->cont.value);
+ if (next_fib->cont.value == Qundef) {
+ cont_restore_0(&next_fib->cont, &next_fib->cont.value);
+ rb_bug("rb_fiber_resume: unreachable");
+ }
return fib->cont.value;
}
else {
VALUE undef = Qundef;
- cont_restore_0(&fib->cont, &undef);
+ cont_restore_0(&next_fib->cont, &undef);
rb_bug("rb_fiber_resume: unreachable");
}
#endif /* FIBER_USE_NATIVE */