Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Fiber specs for Ruby 3.1 #1243

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Update Fiber specs for Ruby 3.1 #1243

wants to merge 3 commits into from

Conversation

herwinw
Copy link
Member

@herwinw herwinw commented Feb 7, 2025

Short version: Ruby 3.0 had a fiber ext that enabled a few extra methods on the Fiber object. The specs for these methods were in library/fiber. Ruby 3.1 has integrated them into the core and made require 'fiber' a noop.
This changes moves the specs from library/fiber into core/fiber.

Related code for Ruby 3.0:

Related code for Ruby 3.1:

Ruby 3.0 had a fiber extension that added a few extra methods to the Fiber
class, even though these methods were implemented in the core:
* https://github.com/ruby/ruby/blob/ruby_3_0/ext/fiber/fiber.c
* https://github.com/ruby/ruby/blob/ruby_3_0/cont.c#L3122

Ruby 3.1 added these methods to the core, removing the need to require fiber:
* https://github.com/ruby/ruby/blob/ruby_3_1/cont.c#L3262

Since these methods are now part of the core, the specs should move to the core
too.

The resume_spec is a bit of an outlier, this one existed both in core/fiber and
library/fiber, where the library one had an additional dependency on
Fiber#transfer (defined in the ext). These two files have been merged.
These are ignored since Ruby 3.1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant