Skip to content

Etc.uname: Report the actual Windows version - #104

Merged
hsbt merged 1 commit into
masterfrom
claude/epic-galileo-03bca1
Sep 27, 2026
Merged

hsbt merged 1 commit into
masterfrom
claude/epic-galileo-03bca1

Conversation

@hsbt

@hsbt hsbt commented Sep 27, 2026

Copy link
Copy Markdown
Member

On Windows 8.1 and later, Etc.uname[:release] returned 6.2.9200 because GetVersionExW reports Windows 8 unless the executable's manifest declares newer versions as supported, and Ruby's manifest does not. It now calls RtlGetVersion, which ignores the manifest. The new test_uname_release_on_windows compares the result with cmd.exe /c ver.

This landed in ruby/ruby first as ruby/ruby@f6ff9e7d02 (ruby/ruby#19074). I brought it here unchanged.

The CI here does not run on Windows, so I checked on x64 mswin with Windows 11 that rake compile test passes on Ruby 4.1.0dev and 3.3.12, and that Etc.uname[:release] changes from 6.2.9200 to 10.0.26200. I did not check the mingw build.

Generated with Claude Code

GetVersionEx reports 6.2.9200 on Windows 8.1 and later unless the manifest of the executable declares them as supported, and ruby.manifest does not. RtlGetVersion is not affected by the manifest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hsbt
hsbt merged commit 57596ea into master Sep 27, 2026
38 checks passed
@hsbt
hsbt deleted the claude/epic-galileo-03bca1 branch September 27, 2026 09:20
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