Skip to content

Drop support for EOL Ruby 2.7#2204

Merged
jneen merged 1 commit intorouge-ruby:masterfrom
larouxn:drop_support_for_eol_rubies
Feb 8, 2026
Merged

Drop support for EOL Ruby 2.7#2204
jneen merged 1 commit intorouge-ruby:masterfrom
larouxn:drop_support_for_eol_rubies

Conversation

@larouxn
Copy link
Copy Markdown
Contributor

@larouxn larouxn commented Feb 4, 2026

Drop support for EOL Ruby 2.7. Retaining support for 3.0 and 3.1 for now, for stragglers.

image

This PR is a modern take on #2129. If we'd rather go with that PR, that's fine. I can close this PR in favour of that one.

References

@jneen
Copy link
Copy Markdown
Member

jneen commented Feb 4, 2026

I can see dropping 2.x, but is there anything specific we gain by not just supporting 3.0+?

@larouxn
Copy link
Copy Markdown
Contributor Author

larouxn commented Feb 5, 2026

There's a tiny bit of cleanup i.e. the Gemfile change and generally only supporting supported Ruby versions tends to lead to lower maintenance costs on average. Relatively common practice too. One example, nokogiri only supports Ruby >= 3.2 i.e. supported versions.

https://github.com/sparklemotion/nokogiri/blob/afc96ace519f518a5208727add18af99f5bb24ba/nokogiri.gemspec#L43

But we can keep 3.x support around if we like. Shall I update this PR to only drop support for Ruby 2.7?

@jneen
Copy link
Copy Markdown
Member

jneen commented Feb 5, 2026

I think unless there's a specific feature we need that's 3.2+ then 3.0+ is fine for now. A lot of people are running older rubies on their personal blogs with jekyll and middleman etc. Likely when there is only one 3.x ruby still in maintenance, we can support just that for stragglers.

@jneen
Copy link
Copy Markdown
Member

jneen commented Feb 5, 2026

As far as the Gemfile changes go, what do you think about moving to these gemified versions of stdlib for all supported rubies if we can? We're moving to a gem for StringScanner, for example.

@larouxn larouxn changed the title Drop support for EOL rubies: 2.7, 3.0, 3.1 Drop support for EOL Ruby 2.7 Feb 5, 2026
@larouxn larouxn force-pushed the drop_support_for_eol_rubies branch from 71bbe37 to fb0e88f Compare February 5, 2026 12:40
@larouxn
Copy link
Copy Markdown
Contributor Author

larouxn commented Feb 5, 2026

As far as the Gemfile changes go, what do you think about moving to these gemified versions of stdlib for all supported rubies if we can? We're moving to a gem for StringScanner, for example.

As in these type of gems? If so, sure, I think that's fine. In fact we sometimes need to do so for some newer rubies. Any thing you have in mind to add here? I see we already have reline which is necessary for Ruby > 3.4, as is irb, if need need either gem's functionality.

rouge/Gemfile

Lines 39 to 43 in 800adbd

gem "mutex_m" if RUBY_VERSION >= '3.4'
gem "base64" if RUBY_VERSION >= '3.4'
gem 'ostruct'
gem 'reline'

@larouxn larouxn force-pushed the drop_support_for_eol_rubies branch from fb0e88f to 1d22086 Compare February 5, 2026 12:54
@jneen jneen added this pull request to the merge queue Feb 8, 2026
Merged via the queue into rouge-ruby:master with commit 2ad8fe8 Feb 8, 2026
10 checks passed
@larouxn larouxn deleted the drop_support_for_eol_rubies branch February 8, 2026 18:04
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