Fixup spec/ruby/optional/capi/rbasic_spec.rb for mswin

This commit is contained in:
MSP-Greg 2022-11-20 15:06:33 -06:00 коммит произвёл Benoit Daloze
Родитель 607fb49dbc
Коммит cf05c202ce
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -1,7 +1,6 @@
require_relative 'spec_helper' require_relative 'spec_helper'
require_relative 'shared/rbasic' require_relative 'shared/rbasic'
load_extension("rbasic") load_extension("rbasic")
return if /mswin/ =~ RUBY_PLATFORM && ENV.key?('GITHUB_ACTIONS') # not working from the beginning
load_extension("data") load_extension("data")
load_extension("array") load_extension("array")

Просмотреть файл

@ -34,7 +34,8 @@ def compile_extension(name)
abi_header = "#{rubyhdrdir}/ruby/internal/abi.h" abi_header = "#{rubyhdrdir}/ruby/internal/abi.h"
if RbConfig::CONFIG["ENABLE_SHARED"] == "yes" if RbConfig::CONFIG["ENABLE_SHARED"] == "yes"
libdirname = RbConfig::CONFIG['libdirname'] # defined since 2.1 # below is defined since 2.1, except for mswin, and maybe other platforms
libdirname = RbConfig::CONFIG.fetch 'libdirname', 'libdir'
libruby = "#{RbConfig::CONFIG[libdirname]}/#{RbConfig::CONFIG['LIBRUBY']}" libruby = "#{RbConfig::CONFIG[libdirname]}/#{RbConfig::CONFIG['LIBRUBY']}"
end end