diff options
author | なつき <[email protected]> | 2023-03-17 09:16:03 -0700 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2023-03-23 17:18:49 +0900 |
commit | 22d037f4ccd6d04cd1ee9aa7dd6f0e6019b5df2b () | |
tree | b0c7ba390f5faf8a0a875168f17b1ea777ebb190 /lib/rubygems/ext/ext_conf_builder.rb | |
parent | e46d473396401f8f320b4a5b8f638630ab42fa4c (diff) |
Move duplicated logic to parent class
Notes: Merged: https://.com/ruby/ruby/pull/7582
-rw-r--r-- | lib/rubygems/ext/ext_conf_builder.rb | 14 |
1 files changed, 1 insertions, 13 deletions
@@ -21,22 +21,10 @@ class Gem::Ext::ExtConfBuilder < Gem::Ext::Builder destdir = ENV["DESTDIR"] - # This is only needed when running rubygems test without a proper installation. - # Prepending it in a normal installation can cause problem with order of $LOAD_PATH. - # Therefore only add rubygems_load_path if it is not present in the default $LOAD_PATH. - rubygems_load_path = File.expand_path("../..", __dir__) - load_path = - case rubygems_load_path - when RbConfig::CONFIG["sitelibdir"], RbConfig::CONFIG["vendorlibdir"], RbConfig::CONFIG["rubylibdir"] - [] - else - ["-I#{rubygems_load_path}"] - end - begin require "shellwords" cmd = Gem.ruby.shellsplit - cmd.push(*load_path) cmd << File.basename(extension) cmd.push(*args) |