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

Support Ruby 3.1 UCRT binary #13

Merged
merged 2 commits into from Jun 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/unit-test.yml
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: [ '2.5', '2.6', '2.7', '3.0' ]
ruby: [ '2.5', '2.6', '2.7', '3.0', '3.1' ]
os:
- windows-latest
experimental: [false]
Expand Down
13 changes: 13 additions & 0 deletions appveyor.yml
Expand Up @@ -14,6 +14,7 @@ test_script:

environment:
matrix:
- ruby_version: "31-x64"
- ruby_version: "30-x64"
- ruby_version: "30"
- ruby_version: "27-x64"
Expand All @@ -32,3 +33,15 @@ environment:
- ruby_version: "21"
- ruby_version: "200-x64"
- ruby_version: "200"

for:
-
matrix:
only:
- ruby_version: "31-x64"
install:
- SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
- ruby --version
- gem --version
- ridk install 1 3
- ridk exec bundle install
4 changes: 3 additions & 1 deletion lib/windows/api.rb
Expand Up @@ -8,7 +8,9 @@ module Windows

# With Microsoft Visual C++ 8 and later users should use the associated
# DLL instead of msvcrt directly, if possible.
if CONFIG['host_os'].split('_')[1]
if RUBY_PLATFORM.split('-')[-1] == "ucrt"
MSVCRT_DLL = 'ucrtbase'
elsif CONFIG['host_os'].split('_')[1]
if CONFIG['host_os'].split('_')[1].to_i >= 80
MSVCRT_DLL = 'msvcr' + CONFIG['host_os'].split('_')[1]
else
Expand Down
2 changes: 1 addition & 1 deletion test/test_windows_api.rb
Expand Up @@ -53,7 +53,7 @@ class TC_Windows_API < Test::Unit::TestCase

def setup
@buf = 0.chr * 256
@runtimes = ['msvcrt', 'msvcr80', 'msvcr90', 'msvcr100']
@runtimes = ['msvcrt', 'msvcr80', 'msvcr90', 'msvcr100', 'ucrtbase']
end

def test_version
Expand Down