Skip to content

Commit

Permalink
[rubygems/rubygems] Don't use full_required_path and extension_dir un…
Browse files Browse the repository at this point in the history
…der the bundler

rubygems/rubygems@72169288ff
  • Loading branch information
hsbt authored and matzbot committed Mar 15, 2023
1 parent 31137dc commit 04a2550
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/bundler/rubygems_ext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,10 @@ def missing_extensions?
# 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

Expand Down

0 comments on commit 04a2550

Please sign in to comment.