Skip to content

Commit

Permalink
Fiber ext was moved into core in 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Oct 23, 2023
1 parent fbce6e2 commit 68e1955
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
1 change: 1 addition & 0 deletions core/src/main/java/org/jruby/Ruby.java
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,7 @@ private void initBootLibraries() {
loadService.provide("rational.rb");
loadService.provide("complex.rb");
loadService.provide("thread.rb");
loadService.provide("fiber.rb");
loadService.provide("ruby2_keywords.rb");

// Load preludes
Expand Down
8 changes: 4 additions & 4 deletions core/src/main/java/org/jruby/ext/fiber/ThreadFiber.java
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ private static void handleExceptionDuringExchange(ThreadContext context, FiberDa
}

@JRubyMethod(rest = true)
public IRubyObject __transfer__(ThreadContext context, IRubyObject[] values) {
public IRubyObject transfer(ThreadContext context, IRubyObject[] values) {
Ruby runtime = context.runtime;

final FiberData data = this.data;
Expand Down Expand Up @@ -455,13 +455,13 @@ private static FiberData verifyCurrentFiber(ThreadContext context, Ruby runtime)
return currentFiberData;
}

@JRubyMethod
public IRubyObject __alive__(ThreadContext context) {
@JRubyMethod(name = "alive?")
public IRubyObject alive_p(ThreadContext context) {
return RubyBoolean.newBoolean(context, alive());
}

@JRubyMethod(meta = true)
public static IRubyObject __current__(ThreadContext context, IRubyObject recv) {
public static IRubyObject current(ThreadContext context, IRubyObject recv) {
return context.getFiber();
}

Expand Down
12 changes: 0 additions & 12 deletions lib/ruby/stdlib/fiber.rb

This file was deleted.

0 comments on commit 68e1955

Please sign in to comment.