Skip to content

MONGOID-5932 Add Ruby 4.0 support to 9.0-stable#6136

Merged
jamis merged 1 commit intomongodb:9.0-stablefrom
jamis:5932-ruby4-9.0-stable
Apr 24, 2026
Merged

MONGOID-5932 Add Ruby 4.0 support to 9.0-stable#6136
jamis merged 1 commit intomongodb:9.0-stablefrom
jamis:5932-ruby4-9.0-stable

Conversation

@jamis
Copy link
Copy Markdown
Contributor

@jamis jamis commented Apr 23, 2026

Ruby 4.0 support was add previously for the master branch (#6082). This backports those changes to the 9.0-stable branch.

Copilot AI review requested due to automatic review settings April 23, 2026 16:33
@jamis jamis requested a review from a team as a code owner April 23, 2026 16:33
@jamis jamis requested a review from comandeo-mongo April 23, 2026 16:33
@jamis jamis added feature Adds a new feature, without breaking compatibility patch For use with the 'feature' label; indicates the PR should be treated as a patch for release purposes labels Apr 23, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Backports Ruby 4.0 support work from master to the 9.0-stable branch by updating specs, dependencies, and Evergreen CI matrices for newer Ruby/JRuby and MongoDB versions.

Changes:

  • Adjusted specs to account for Ruby 3.4+ Hash#inspect formatting.
  • Reworked integration app tests to generate Sinatra/Rails apps on the fly and added Ruby/Rails compatibility skips/workarounds.
  • Updated gem/runtime and CI compatibility metadata (gemspec, README, Evergreen config, submodules).

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
spec/mongoid/errors/document_not_found_spec.rb Makes the error message assertion tolerant of Ruby 3.4+ hash inspect format.
spec/integration/app_spec.rb Switches from cloned/local apps to generated apps; adds Ruby/Rails skip logic and Rails logger workarounds.
mongoid.gemspec Adds ostruct runtime dependency for Ruby 4.0 compatibility.
README.md Updates stated compatibility ranges for MRI/JRuby and MongoDB server.
.gitmodules Removes the test-apps submodule entry.
.evergreen/config/variants.yml.erb Expands test matrix to include Ruby 4.0, ruby-dev, JRuby 10.0, and newer MongoDB versions.
.evergreen/config/axes.yml.erb Adds Ruby 3.4/4.0/ruby-dev, JRuby 10.0, Ubuntu 24.04, and MongoDB 8.2 axes.
.evergreen/config.yml Applies the same axis/matrix updates to the generated Evergreen config.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread spec/integration/app_spec.rb
Comment thread spec/integration/app_spec.rb
Comment thread spec/integration/app_spec.rb
Comment thread .evergreen/config/variants.yml.erb
Comment thread spec/mongoid/errors/document_not_found_spec.rb
@jamis jamis merged commit 033b784 into mongodb:9.0-stable Apr 24, 2026
82 of 98 checks passed
@jamis jamis deleted the 5932-ruby4-9.0-stable branch April 24, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Adds a new feature, without breaking compatibility patch For use with the 'feature' label; indicates the PR should be treated as a patch for release purposes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants