Skip to content

Commit

Permalink
[rubygems/rubygems] Revert missing extensions patch
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez authored and hsbt committed Dec 12, 2023
1 parent 3834850 commit a811ebf
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions lib/bundler/rubygems_ext.rb
Expand Up @@ -78,24 +78,6 @@ def extension_dir
end
end

alias_method :rg_missing_extensions?, :missing_extensions?
def missing_extensions?
# When we use this methods with local gemspec, we don't handle
# build status of extension correctly. So We need to find extension
# files in require_paths.
# 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 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

rg_missing_extensions?
end

remove_method :gem_dir
def gem_dir
full_gem_path
Expand Down

0 comments on commit a811ebf

Please sign in to comment.