summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2013-11-04 23:58:32 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2013-11-04 23:58:32 +0900
commite386760cc7b7958a8948b0a23b35b3a9df30c354 (patch)
treeab7a023e426242ac22ec4f57b2ba8324eaa0e5d6 /src
parentfb831b6a5e7282612d802979c5012e038ab0ad0b (diff)
downloadmruby-e386760cc7b7958a8948b0a23b35b3a9df30c354.tar.gz
mruby-e386760cc7b7958a8948b0a23b35b3a9df30c354.zip
add Fiber.current
Diffstat (limited to 'src')
-rw-r--r--src/gc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gc.c b/src/gc.c
index 361024af3..ccd925da8 100644
--- a/src/gc.c
+++ b/src/gc.c
@@ -619,7 +619,8 @@ obj_free(mrb_state *mrb, struct RBasic *obj)
{
struct mrb_context *c = ((struct RFiber*)obj)->cxt;
- mrb_free_context(mrb, c);
+ if (c != mrb->root_c)
+ mrb_free_context(mrb, c);
}
break;