Skip to content

Commit 8b83e4b

Browse files
authored
Merge pull request #13 from ashie/support-ruby-3.1-ucrt
Support Ruby 3.1 UCRT binary
2 parents a59b329 + 7dea4d9 commit 8b83e4b

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

.github/workflows/unit-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
ruby: [ '2.5', '2.6', '2.7', '3.0' ]
12+
ruby: [ '2.5', '2.6', '2.7', '3.0', '3.1' ]
1313
os:
1414
- windows-latest
1515
experimental: [false]

appveyor.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ test_script:
1414

1515
environment:
1616
matrix:
17+
- ruby_version: "31-x64"
1718
- ruby_version: "30-x64"
1819
- ruby_version: "30"
1920
- ruby_version: "27-x64"
@@ -32,3 +33,15 @@ environment:
3233
- ruby_version: "21"
3334
- ruby_version: "200-x64"
3435
- ruby_version: "200"
36+
37+
for:
38+
-
39+
matrix:
40+
only:
41+
- ruby_version: "31-x64"
42+
install:
43+
- SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
44+
- ruby --version
45+
- gem --version
46+
- ridk install 1 3
47+
- ridk exec bundle install

lib/windows/api.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ module Windows
88

99
# With Microsoft Visual C++ 8 and later users should use the associated
1010
# DLL instead of msvcrt directly, if possible.
11-
if CONFIG['host_os'].split('_')[1]
11+
if RUBY_PLATFORM.split('-')[-1] == "ucrt"
12+
MSVCRT_DLL = 'ucrtbase'
13+
elsif CONFIG['host_os'].split('_')[1]
1214
if CONFIG['host_os'].split('_')[1].to_i >= 80
1315
MSVCRT_DLL = 'msvcr' + CONFIG['host_os'].split('_')[1]
1416
else

test/test_windows_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class TC_Windows_API < Test::Unit::TestCase
5353

5454
def setup
5555
@buf = 0.chr * 256
56-
@runtimes = ['msvcrt', 'msvcr80', 'msvcr90', 'msvcr100']
56+
@runtimes = ['msvcrt', 'msvcr80', 'msvcr90', 'msvcr100', 'ucrtbase']
5757
end
5858

5959
def test_version

0 commit comments

Comments
 (0)