diff options
| author | David Rodriguez <deivid.rodriguez@riseup.net> | 2024-05-06 14:53:52 +0200 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2024-05-06 17:06:50 +0000 |
| commit | 5c018cddcca52c9d00c16cfad252a74750d0852e (patch) | |
| tree | c041c26105a40248d77ad9e373916d1cb642c34c | |
| parent | e276929511dd690128de08da5f379ea7df539a0c (diff) | |
[rubygems/rubygems] Remove unnecessary compatibility code
https://github.com/rubygems/rubygems/commit/160a515412
| -rw-r--r-- | lib/rubygems/ext/cargo_builder.rb | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/lib/rubygems/ext/cargo_builder.rb b/lib/rubygems/ext/cargo_builder.rb index 86a0e73f28..09ad1407c2 100644 --- a/lib/rubygems/ext/cargo_builder.rb +++ b/lib/rubygems/ext/cargo_builder.rb @@ -184,6 +184,7 @@ class Gem::Ext::CargoBuilder < Gem::Ext::Builder end def cargo_dylib_path(dest_path, crate_name) + so_ext = RbConfig::CONFIG["SOEXT"] prefix = so_ext == "dll" ? "" : "lib" path_parts = [dest_path] path_parts << ENV["CARGO_BUILD_TARGET"] if ENV["CARGO_BUILD_TARGET"] @@ -312,22 +313,6 @@ EOF deffile_path end - # We have to basically reimplement <code>RbConfig::CONFIG['SOEXT']</code> here to support - # Ruby < 2.5 - # - # @see https://github.com/ruby/ruby/blob/c87c027f18c005460746a74c07cd80ee355b16e4/configure.ac#L3185 - def so_ext - return RbConfig::CONFIG["SOEXT"] if RbConfig::CONFIG.key?("SOEXT") - - if win_target? - "dll" - elsif darwin_target? - "dylib" - else - "so" - end - end - # Corresponds to $(LIBPATH) in mkmf def mkmf_libpath ["-L", "native=#{makefile_config("libdir")}"] |
