From 04a2550928c3e0122e976fcf87c56f59b8a071ff Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Mon, 13 Mar 2023 19:24:00 +0900 Subject: [PATCH] [rubygems/rubygems] Don't use full_required_path and extension_dir under the bundler https://github.com/rubygems/rubygems/commit/72169288ff --- lib/bundler/rubygems_ext.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb index 35cc5b6cf8..d298a17672 100644 --- a/lib/bundler/rubygems_ext.rb +++ b/lib/bundler/rubygems_ext.rb @@ -82,9 +82,10 @@ module Gem # TODO: Gem::Specification couldn't access extension name from extconf.rb # so we find them with heuristic way. We should improve it. if source.respond_to?(:root) - return false if (full_require_paths - [extension_dir]).any? do |path| - File.exist?(File.join(path, "#{name}.#{RbConfig::CONFIG["DLEXT"]}")) || - !Dir.glob(File.join(path, name, "*.#{RbConfig::CONFIG["DLEXT"]}")).empty? + return false if raw_require_paths.any? do |path| + ext_dir = File.join(full_gem_path, path) + File.exist?(File.join(ext_dir, "#{name}.#{RbConfig::CONFIG["DLEXT"]}")) || + !Dir.glob(File.join(ext_dir, name, "*.#{RbConfig::CONFIG["DLEXT"]}")).empty? end end