Support ruby 4.0 - #12
Merged
Merged
Conversation
benchmark is no longer a default gem as of ruby 4.0, so rubocop (and anything else that shells out to it) fails to load without it being declared explicitly in the Gemfile, same as ostruct/base64 before it. ext/pgp_rb already compiles and passes the full spec suite against ruby 4.0.6 with the current rb-sys/magnus pins, so no Cargo changes are needed. Bumping the gem version so a new tag triggers the release workflow, which picks up ruby 4.0 automatically from https://cache.ruby-lang.org/pub/misc/ci_versions/cruby.json and publishes precompiled binaries + a required_ruby_version upper bound that covers it.
kzaitsev
pushed a commit
that referenced
this pull request
Aug 12, 2026
0.2.3 (#12) added source-level ruby 4.0 support, but the precompiled gems it published only ship a 3.4 binary (verified by downloading the actual x86_64-linux gem and checking its spec). Root cause: Gemfile.lock had rb_sys locked at 0.9.105, way older than even the 0.9.124 already pinned in Cargo.toml, and unrelated to the rake-compiler-dock-image:1.12.0 tag the docker/Dockerfile.* files already reference. The cross-gem release job reads the rb_sys version straight out of Gemfile.lock to decide which rake-compiler-dock image to use, so it silently built against an image that predates ruby 4.0 (and 3.3) support and dropped both from the fat gem instead of failing loudly. Bumping rb_sys to 0.9.128 (latest, pulls in rake-compiler-dock 1.12.0, matching the Dockerfiles) and rb-sys to the same version in Cargo.toml for consistency. Recompiled and ran the full spec suite locally against ruby 4.0.6 - all green.
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.
Summary
0.2.2to0.2.3benchmarkas an explicit Gemfile dependency (no longer a default gem as of Ruby 4.0, was breaking rubocop with aLoadError)ext/pgp_rbcompiles and the full spec suite passes against Ruby 4.0.6 with existingrb-sys/magnuspins — no Cargo changes neededcache.ruby-lang.org's CI version feed once this is tagged, publishing precompiled binaries + arequired_ruby_versionupper bound that covers itChanged Files
lib/pgp-rb/version.rb— version bump0.2.2→0.2.3Gemfile— addbenchmarkdependencyGemfile.lock— reflects new version andbenchmarkdependency