diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 13471985..279ebc48 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -16,6 +16,8 @@ jobs: include: - os: ubuntu-20.04 ruby: '3.1' + - os: macos-13 + ruby: '3.0' exclude: # There's something wrong with this setup in GHA such that # it gets weird linking errors, however I'm unable to reproduce diff --git a/lib/mkmf-rice.rb b/lib/mkmf-rice.rb index 75ebcf30..ab9ead10 100644 --- a/lib/mkmf-rice.rb +++ b/lib/mkmf-rice.rb @@ -1,7 +1,7 @@ require 'mkmf' -IS_MSWIN = RbConfig::CONFIG['host_os'].match?(/mswin/) -IS_MINGW = RbConfig::CONFIG['host_os'].match?(/mingw/) +IS_MSWIN = /mswin/ =~ RUBY_PLATFORM +IS_MINGW = /mingw/ =~ RUBY_PLATFORM IS_DARWIN = RbConfig::CONFIG['host_os'].match?(/darwin/) # The cpp_command is not overwritten in the experimental mkmf C++ support. @@ -38,10 +38,6 @@ def cpp_command(outfile, opt="") raise("Could not find rice/rice.hpp header") end -if IS_DARWIN - have_library('c++') -elsif !IS_MSWIN - if !have_library('stdc++fs') - have_library('stdc++') - end -end \ No newline at end of file +if !IS_DARWIN && !IS_MSWIN && !have_library('stdc++fs') + have_library('stdc++') +end