Skip to content

fix: support Ruby 4 by allowing Rouge 4.x#95

Merged
markets merged 1 commit into
middleman:masterfrom
chadlwilson:support-ruby-4
Feb 23, 2026
Merged

fix: support Ruby 4 by allowing Rouge 4.x#95
markets merged 1 commit into
middleman:masterfrom
chadlwilson:support-ruby-4

Conversation

@chadlwilson

Copy link
Copy Markdown
Contributor

Ruby 4.x dropped CGI almost entirely, which Rouge 3.x depends on, thus supporting Ruby 4.x requires allowing Rouge 4.x, which has been out for 3 years; supports Ruby 2.7+ and appears very stable.

The breaking changes in Rouge 4.x don't affect modern middleman since they mainly are just dropping Ruby < 2.7:

https://github.com/rouge-ruby/rouge/blob/master/CHANGELOG.md#version-400-2022-09-04

Also dropped the dev-only Gemfile haml restriction, as the monkey patch seems to work fine with haml 7; and haml 6 and tests seems to work perfectly fine on Ruby 2.7. Since we dropped Ruby < 2.7 some time ago, perhaps this restriction was intended for even older Rubies.

@markets markets merged commit 89aab53 into middleman:master Feb 23, 2026
7 checks passed
@chadlwilson chadlwilson deleted the support-ruby-4 branch February 23, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants