Skip to content

Commit

Permalink
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/src/main/java/org/jruby/ext/fiber/ThreadFiber.java
Original file line number Diff line number Diff line change
@@ -37,8 +37,9 @@ public static void initRootFiber(ThreadContext context) {

ThreadFiber rootFiber = new ThreadFiber(runtime, runtime.getClass("Fiber")); // FIXME: getFiber()

rootFiber.data = new FiberData(new FiberQueue(runtime), null, rootFiber);
rootFiber.thread = context.getThread();
RubyThread currentThread = context.getThread();
rootFiber.data = new FiberData(new FiberQueue(runtime), currentThread, rootFiber);
rootFiber.thread = currentThread;
context.setRootFiber(rootFiber);
}

1 comment on commit e6a1e3a

@chuckremes
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet! That was an easy fix. Thank you.

Please sign in to comment.