Restore Ruby 3.1 support - #739
Merged
Merged
Conversation
i18n 1.15.1 raised the required Ruby version to 3.2 to address ruby-i18n#735, where Ruby 3.1 users hit `NoMethodError: undefined method '[]' for Fiber:Class`. As a result, Ruby 3.1 users remain on the broken i18n 1.15.0 release and cannot upgrade to a fixed version. Restore Ruby 3.1 support and ship a patch that works on both Ruby 3.1 and Ruby 3.2 so that Ruby 3.1 users can upgrade to 1.15.x without incompatibility. On Ruby without the `Fiber[]` storage API (Ruby 3.1), the config and fallbacks storage falls back to thread-local variables; on Ruby 3.2+ it keeps using Fiber storage. The previously removed test branches and Fiber-isolation skip guards are brought back as regression coverage for the Ruby 3.1 path. This approach also lets existing Ruby 3.1 users who pin `gem "i18n", "!= 1.15.0"` in their Gemfile use i18n 1.15.2 and later without incompatibility. The CI matrix gains Ruby 3.1, excluding the Rails 8.0.x (requires Ruby 3.2+) and Rails main (requires Ruby 3.3+) gemfiles which do not support Ruby 3.1. Although Ruby 3.1 is already EOL, libraries (unlike applications) provide value by remaining usable for a broad range of users, so the thread-local fallback path is intentionally retained for environments without `Fiber[]` (including JRuby 9.4).
This was referenced Jun 19, 2026
Collaborator
|
Thank you @koic! |
This was referenced Jun 20, 2026
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.
i18n 1.15.1 raised the required Ruby version to 3.2 to address #735, where Ruby 3.1 users hit
NoMethodError: undefined method '[]' for Fiber:Class. As a result, Ruby 3.1 users remain on the broken i18n 1.15.0 release and cannot upgrade to a fixed version.Restore Ruby 3.1 support and ship a patch that works on both Ruby 3.1 and Ruby 3.2 so that Ruby 3.1 users can upgrade to 1.15.x without incompatibility. On Ruby without the
Fiber[]storage API (Ruby 3.1), the config and fallbacks storage falls back to thread-local variables; on Ruby 3.2+ it keeps using Fiber storage. The previously removed test branches and Fiber-isolation skip guards are brought back as regression coverage for the Ruby 3.1 path.This approach also lets existing Ruby 3.1 users who pin
gem "i18n", "!= 1.15.0"in their Gemfile use i18n 1.15.2 and later without incompatibility.The CI matrix gains Ruby 3.1, excluding the Rails 8.0.x (requires Ruby 3.2+) and Rails main (requires Ruby 3.3+) gemfiles which do not support Ruby 3.1.
Although Ruby 3.1 is already EOL, libraries (unlike applications) provide value by remaining usable for a broad range of users, so the thread-local fallback path is intentionally retained for environments without
Fiber[](including JRuby 9.4).