Find .ext/common path from LOAD_PATH for out-of-place build

This commit is contained in:
Hiroshi SHIBATA 2024-11-15 13:13:23 +09:00
parent 8dccf5a334
commit b45f7a54af
Notes: git 2024-11-15 05:04:37 +00:00

View File

@ -55,7 +55,8 @@ module Gem::BUNDLED_GEMS
conf = ::RbConfig::CONFIG conf = ::RbConfig::CONFIG
if ENV["TEST_BUNDLED_GEMS"] if ENV["TEST_BUNDLED_GEMS"]
LIBDIR = (File.expand_path(File.join(__dir__, "..", "lib")) + "/").freeze LIBDIR = (File.expand_path(File.join(__dir__, "..", "lib")) + "/").freeze
ARCHDIR = (File.expand_path(File.join(__dir__, "..", ".ext/common")) + "/").freeze rubyarchdir = $LOAD_PATH.find{|path| path.include?(".ext/common") }
ARCHDIR = (File.expand_path(rubyarchdir) + "/").freeze
else else
LIBDIR = (conf["rubylibdir"] + "/").freeze LIBDIR = (conf["rubylibdir"] + "/").freeze
ARCHDIR = (conf["rubyarchdir"] + "/").freeze ARCHDIR = (conf["rubyarchdir"] + "/").freeze