summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/bundled_gems.rb3
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