diff options
author | Hiroshi SHIBATA <[email protected]> | 2024-11-15 13:13:23 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2024-11-15 14:04:19 +0900 |
commit | b45f7a54aff65eb37d60264f8dcbbc18587b9855 (patch) | |
tree | a3b6b852b9c27b0a5eb3c7704bc013c3deac0630 | |
parent | 8dccf5a334b97e29c410c75638989ac4cb904556 (diff) |
Find .ext/common path from LOAD_PATH for out-of-place build
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/12096
-rw-r--r-- | lib/bundled_gems.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bundled_gems.rb b/lib/bundled_gems.rb index 9b0fc90a27..2a00e83a46 100644 --- a/lib/bundled_gems.rb +++ b/lib/bundled_gems.rb @@ -55,7 +55,8 @@ module Gem::BUNDLED_GEMS conf = ::RbConfig::CONFIG if ENV["TEST_BUNDLED_GEMS"] 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 LIBDIR = (conf["rubylibdir"] + "/").freeze ARCHDIR = (conf["rubyarchdir"] + "/").freeze |