Skip to content

CI: Get to green on Ruby head (4.1) - #259

Merged
olleolleolle merged 2 commits into
savonrb:mainfrom
olleolleolle:fix-ruby-head-native-extensions
Jul 30, 2026
Merged

CI: Get to green on Ruby head (4.1)#259
olleolleolle merged 2 commits into
savonrb:mainfrom
olleolleolle:fix-ruby-head-native-extensions

Conversation

@olleolleolle

@olleolleolle olleolleolle commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Slop:

Ruby head is now 4.1. It removed the untyped Data_Wrap_Struct/Data_Get_Struct C API.

In order to keep us buildable:

  • curb: TruffleRuby stays on < 1.0 of curb (that builds)
  • curb: Ruby 4.1 uses 1.0+ (that bilds)
  • em-http-request/em-synchrony: only declared Ruby <4.1. (eventmachine 1.2.7 is its last release (2018), so there is no version to bump to.)

See: https://github.com/savonrb/httpi/actions/runs/30506928846/job/90758618681

Ruby 4.1 removed the untyped Data_Wrap_Struct/Data_Get_Struct C API, so
two Gemfile entries no longer build and bundle install fails before the
specs run:

  curb 0.9.11    curb_easy.c:76: expected expression before 'ruby_curl_upload'
  eventmachine   rubymain.cpp:53: 'Data_Wrap_Struct' was not declared

curb 1.0 moved to the TypedData API, so bump to '~> 1.3'.

eventmachine 1.2.7 (2018) is its last release and there is nothing to
bump to, so only declare em-http-request/em-synchrony below Ruby 4.1.
The specs now detect the gems via EM_HTTP_AVAILABLE instead of assuming
they are installed, replacing the RUBY_PLATFORM =~ /java/ guards.
HTTPI::Adapter.default_adapter already rescues LoadError.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coveralls

coveralls commented Jul 30, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 96.327%. remained the same — olleolleolle:fix-ruby-head-native-extensions into savonrb:main

curb 1.x's TypedData free functions crash TruffleRuby's C-extension
reference-processor thread:

  dead handle 0xbad000000090080
  from rb_tr_rtypeddata_run_finalizer (data.c:83)

TruffleRuby's Bundler platform is :ruby, so this needs a RUBY_ENGINE
check rather than a platforms: option. CRuby stays on 1.3, which it
needs to build on Ruby 4.1.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@olleolleolle
olleolleolle marked this pull request as ready for review July 30, 2026 07:06
@olleolleolle olleolleolle changed the title Fix bundle install on Ruby head (4.1) CI: Get to green on Ruby head (4.1) Jul 30, 2026
@olleolleolle
olleolleolle merged commit 8d8c984 into savonrb:main Jul 30, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants