End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Gem::Ext::CargoBuilder#so_ext
so_ext
lib/rubygems/ext/cargo_builder.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/lib/rubygems/ext/cargo_builder.rb, line 232
def so_ext
return RbConfig::CONFIG["SOEXT"] if RbConfig::CONFIG.key?("SOEXT")
if win_target?
"dll"
elsif darwin_target?
"dylib"
else
"so"
end
end
We have to basically reimplement RbConfig::CONFIG['SOEXT'] here to support Ruby < 2.5
@see github.com/ruby/ruby/blob/c87c027f18c005460746a74c07cd80ee355b16e4/configure.ac#L3185
See also
#rustc_lib_flags
#split_flags
#rustc_dynamic_linker_flags
#validate_cargo_build!
also in
3.3 · 3.2