Skip to content

Forward-port win32/resolv fixes from ruby/ruby#19030 - #149

Merged
hsbt merged 3 commits into
masterfrom
claude/gracious-yonath-553370
Sep 26, 2026
Merged

hsbt merged 3 commits into
masterfrom
claude/gracious-yonath-553370

Conversation

@hsbt

@hsbt hsbt commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

This brings over the two commits of ruby/ruby#19030.

The first casts the five method registrations in InitVM_resolv with RUBY_METHOD_FUNC. GCC 15 in C23 mode rejects the bare function pointers against the Ruby 3.1 headers, which do not cast them themselves, as reported in #92. The Windows 3.1 job currently uses GCC 14, so CI does not show that error.

The second fixes the defined?(Win32::Resolve) typo in test/resolv/test_win32_config.rb, which kept TestWin32Config from running anywhere. I built the extension without warnings and ran the full suite with mswin Ruby 4.1.0dev and 3.3.12, and the three tests now run and pass.

Once the tests ran, two of them raised NoMethodError on JRuby on Windows, which loads its bundled win32/resolv without tcpip_params. The JRuby step is continue-on-error, so the jobs still showed success. A third commit runs the tests only when the extension is loaded.

Generated with Claude Code

hsbt and others added 3 commits September 26, 2026 06:32
GCC 15 in C23 mode reads `ANYARGS` as `(void)`, so the bare function pointers are rejected against Ruby headers that do not add the cast themselves, as happened with Ruby 3.1 on Windows.

#92

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`Win32::Resolve` is never defined, so these tests were not run anywhere.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JRuby on Windows loads its bundled `win32/resolv`, which has no `tcpip_params`, so two of these tests raised NoMethodError there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hsbt
hsbt merged commit ce86a83 into master Sep 26, 2026
74 checks passed
@hsbt
hsbt deleted the claude/gracious-yonath-553370 branch September 26, 2026 01:08
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