Exclude rack 3.2.6 on Ruby 2.5 - #828
Merged
Merged
Conversation
rack 3.2.6 added a block form of Array#to_h, introduced in Ruby 2.6,
to lib/rack/utils.rb while its gemspec still declares
required_ruby_version >= 2.4.0. Bundler therefore resolves rack 3.2.6
on Ruby 2.5 and requiring sprockets fails:
rack-3.2.6/lib/rack/utils.rb:149:in `to_h': wrong element type
String at 0 (expected array) (TypeError)
https://github.com/rails/sprockets/actions/runs/27955713071/job/87812447285?pr=827
Upstream restored Ruby 2.4/2.5 compatibility on the 3-2-stable branch
(rack/rack#2450, commit 108405ea9fec), but no release including the fix
is available yet. Excluding only 3.2.6 lets Ruby 2.5 pick up the next
rack release automatically.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
The Ruby 2.5 CI job currently fails at require time, which blocks #827 and any other pull request:
https://github.com/rails/sprockets/actions/runs/27955713071/job/87812447285?pr=827
rack 3.2.6 added a block form of
Array#to_h, introduced in Ruby 2.6, tolib/rack/utils.rbas part of the Forwarded header parser rewrite, while its gemspec still declaresrequired_ruby_version >= 2.4.0. Bundler therefore resolves rack 3.2.6 on Ruby 2.5 andrequire "sprockets"fails. The weekly runs on themainbranch turned from success (2026-07-06) to failure (2026-07-13) for the same reason, so re-running the failed job does not help.Upstream already restored Ruby 2.4/2.5 compatibility on the 3-2-stable branch (rack/rack#2450, rack/rack@108405e), but no release including the fix is available yet. This change excludes only 3.2.6 on Ruby 2.5, so the next rack release applies automatically.
Verified in a ruby:2.5 container: rack resolves to 3.2.5 and the test suite loads and runs (the failure above happens before any test runs).