Skip to content

Require Ruby 2.4 or later - #81

Merged
hsbt merged 3 commits into
masterfrom
require-ruby-2-4
Sep 26, 2026
Merged

hsbt merged 3 commits into
masterfrom
require-ruby-2-4

Conversation

@hsbt

@hsbt hsbt commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

win32ole.gemspec declares required_ruby_version >= 2.3.0, but the extension cannot build on Ruby 2.3. It uses RB_INT2FIX in 61 places, and ruby.h only defines that macro since Ruby 2.4. This was already the case when win32ole became a gem.

I raised required_ruby_version to 2.4 and lowered min_version in the Windows workflow from 2.6 to 2.4, so CI now tests the declared minimum.

This also fixes the flaky test_s_new_loop, which failed on 2.6 in the first run here with @event being just "OnCompleted". When GC collects the @wmi connection left by an earlier test while an event delivery is pending, WMI cancels the running query with WBEM_E_CALL_CANCELLED. I release the connection in teardown. Locally the query was cancelled mid-test in 13 of 18 runs before and in none of 7 runs after.

Generated with Claude Code

hsbt and others added 3 commits September 14, 2026 17:23
The extension uses RB_INT2FIX, which ruby.h defines only since Ruby 2.4, so it has never built on 2.3.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A connection left to GC was collected in the middle of a later test, and WMI then cancelled that test's query with WBEM_E_CALL_CANCELLED. When this happened before the first OnObjectReady was dispatched, test_s_new_loop saw only "OnCompleted" and failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hsbt
hsbt merged commit 2a18a3e into master Sep 26, 2026
28 checks passed
@hsbt
hsbt deleted the require-ruby-2-4 branch September 26, 2026 23:26
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