Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dependency on win32ole #573

Merged
merged 1 commit into from
Jun 17, 2024
Merged

Remove dependency on win32ole #573

merged 1 commit into from
Jun 17, 2024

Conversation

Earlopain
Copy link
Contributor

This gem is being bundled in Ruby 3.5: ruby/ruby@f365bef

So, just use buildin commands to do the same thing.

The powershell version will work on at least Windows 8 (from 2012). There are no docs I could find for earlier versions, so it might work on even earlier versions. https://learn.microsoft.com/en-us/powershell/scripting/install/powershell-support-lifecycle?view=powershell-7.4. Fall back to the deprecated wmic if it doesn't exist.

I have openen grosser/parallel#346 and ruby-concurrency/concurrent-ruby#1051 which do the same thing.

This gem is being bundled in Ruby 3.5: ruby/ruby@f365bef

So, just use buildin commands to do the same thing.

The powershell version will work on at least Windows 8. There are no docs I could find for earlier versions
wmic is deprecated, prefer the powershell version
@hsbt
Copy link
Member

hsbt commented Jun 17, 2024

Thanks 👍 I confirmed your powershell script is working correctly.

hsbt@FISCHER C:\Users\hsbt\source\ruby.build\2022>powershell -command "Get-CimInstance -ClassName Win32_Processor -Property NumberOfCores | Select-Object -Property NumberOfCores"

NumberOfCores
-------------
            8

@hsbt hsbt merged commit a7f9aee into ruby:master Jun 17, 2024
28 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