[rubygems/rubygems] Don't use full_required_path and extension_dir under the bundler

https://github.com/rubygems/rubygems/commit/72169288ff
This commit is contained in:
Hiroshi SHIBATA 2023-03-13 19:24:00 +09:00 коммит произвёл git
Родитель 31137dc67f
Коммит 04a2550928
1 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -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