Declare required_ruby_version >= 3.1#4
Open
bidsketchris wants to merge 1 commit into
Open
Conversation
The gemspec set no required_ruby_version, so Bundler/RubyGems would let the gem install on Rubies it isn't tested against, then fail at runtime on syntax/APIs it relies on (e.g. delete_suffix, 2.5+). The CI matrix runs 3.1–head and .standard.yml pins 3.1.4, so >= 3.1 matches the actually-supported range and surfaces unsupported Rubies at install time with a clear error instead of an obscure runtime crash. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
bidsketchris
requested review from
a team,
cristian-cepeda-signwell and
juankisardin
and removed request for
a team
June 19, 2026 10:45
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.
Problem
The gemspec declares no
required_ruby_version. Bundler/RubyGems will therefore installinteractoron any Ruby, including versions the gem isn't tested against — where it then fails at runtime on syntax/APIs it relies on (e.g.String#delete_suffix, Ruby 2.5+). The failure surfaces as an obscure runtime crash rather than a clear resolution-time error.Change
>= 3.1matches the actually-supported range:3.1,3.2,3.3,3.4, andhead..standard.ymlpinsruby_version: 3.1.4.With the constraint, an unsupported Ruby is rejected at
bundle install/gem installwith a clear message instead of crashing later.Notes
OpenStructfromContext#3 (the OpenStruct removal); branched offmasterso it can merge on its own.🤖 Generated with Claude Code