Skip to content

Require Ruby 3.2 or later - #139

Merged
Watson1978 merged 1 commit into
socketry:mainfrom
Watson1978:require-ruby-3-2
Oct 25, 2026
Merged

Watson1978 merged 1 commit into
socketry:mainfrom
Watson1978:require-ruby-3-2

Conversation

@Watson1978

Copy link
Copy Markdown
Collaborator

The gemspec did not state a minimum Ruby version. CI tests Ruby 3.2 to 4.0 and nothing older, so this declares required_ruby_version = ">= 3.2". On a Mac with rbenv, Ruby 3.1.6 builds but fails the GC compaction spec, because GC.verify_compaction_references(expand_heap:) needs 3.2, and on Ruby 3.0.7 the development dependencies no longer install. Fluentd, the main user, already requires Ruby 3.3.

Types of Changes

  • Maintenance.

Contribution

🤖 Generated with Claude Code

CI tests Ruby 3.2 to 4.0 and nothing older. Ruby 3.1 fails the GC
compaction spec, since GC.verify_compaction_references(expand_heap:)
needs 3.2, and the development dependencies no longer install on 3.0.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Watson1978
Watson1978 merged commit 43e3ffe into socketry:main Oct 25, 2026
15 checks passed
@Watson1978
Watson1978 deleted the require-ruby-3-2 branch October 25, 2026 14:50
Watson1978 added a commit that referenced this pull request Oct 25, 2026
Ruby 3.2 or later is required since #139. rb_io_descriptor,
rb_thread_call_without_gvl, ruby/io.h and ruby/thread.h always exist
there, so the extconf checks for them, for rb_thread_blocking_region,
rb_thread_alone, rb_str_set_len, rb_io_t and libc, and the matching
#ifdef branches go away. The unused RUBY_VERSION_CODE define and the
Ruby 1.8 branch of FPTR_TO_FD, which produced -Wundef warnings for
RUBY_VERSION_MAJOR, go with them. The Windows native spec fixture now
builds the same GVL releasing poll as the extension, since that code no
longer depends on defines from extconf.rb.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
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.

1 participant