feat: handle ABI version suffix in Ruby HEAD#706
Merged
gjtorikian merged 1 commit intooxidize-rb:mainfrom Feb 1, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates rb-sys’s environment/version handling to correctly support Ruby’s new +N ABI suffix while keeping strict numeric parsing for discrete MAJOR/MINOR/TEENY env vars, and adds tests to lock in the expected behavior.
Changes:
- Bump internal crate versions in the fuzz workspace lockfile to align with the new rb-sys and helper crate versions.
- Add a build-script test to ensure
Version::currentcorrectly parsesruby_versionstrings with a+Nsuffix. - Extend
RubyVersion::from_raw_environmentto parseVERSION/ruby_version/RUBY_VERSIONvalues with suffixes via a newparse_version_componenthelper, while preserving strict numeric parsing forMAJOR/MINOR/TEENY, and add targeted tests for these cases.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| fuzz/Cargo.lock | Updates pinned versions of rb-sys, rb-sys-build, rb-sys-env, and test-helper crates to match the new crate versions used elsewhere. |
| crates/rb-sys/build/version.rs | Adds a unit test for Version::current to confirm that a ruby_version like 4.1.0+1 is parsed to Version::new(4, 1). |
| crates/rb-sys-env/src/ruby_version.rs | Adjusts environment-based Ruby version parsing to accept +N and similar suffixes on VERSION / ruby_version / RUBY_VERSION, introduces parse_version_component, and adds tests for suffix handling and for rejecting suffixed MAJOR. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1182081 to
d9f9557
Compare
This was referenced Jan 31, 2026
gjtorikian
reviewed
Feb 1, 2026
• lock in ruby_version/RUBY_VERSION +N parsing • keep MAJOR/MINOR/TEENY strict numeric parsing • add version.rs coverage for ruby_version suffix case
d9f9557 to
5b737ea
Compare
Member
|
thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #705
See: matsadler/magnus#167
Related: #703