Etc.uname: Return "ARM64" on Windows ARM64 and drop Win9x branches - #102
Merged
Merged
Conversation
GetSystemInfo reports PROCESSOR_ARCHITECTURE_ARM64 there, which fell through to "unknown". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GetVersionExW always reports VER_PLATFORM_WIN32_NT, since Windows 9x support had been dropped in 8a02eed723 before Etc.uname was implemented on Windows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Windows ARM64,
Etc.uname[:machine]returned"unknown"becauseGetSystemInforeportsPROCESSOR_ARCHITECTURE_ARM64, which the switch did not handle. The second commit removes the Win32s and Win9x branches, sinceGetVersionExWonly reportsVER_PLATFORM_WIN32_NTon the Windows versions Ruby supports.Both commits landed in ruby/ruby first as ruby/ruby@640a8b9cc7 and ruby/ruby@7d51ed4706 (ruby/ruby#19015). I brought them here unchanged.
The CI here does not run on Windows, so I checked on x64 mswin that
rake compile testpasses andEtc.unameprints the same output before and after. The ruby/ruby Windows 11-arm job compiles the ARM64 case, but I have no ARM64 machine to check the returned value.Generated with Claude Code