Skip to content

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.
Copy link
Member

@andrykonchin andrykonchin left a comment

Choose a reason for hiding this comment

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

Thank you!

@andrykonchin andrykonchin merged commit 03278d0 into ruby:master Feb 10, 2025
14 checks passed
@herwinw herwinw deleted the fiber branch February 11, 2025 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants