summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Rodríguez <[email protected]>2024-06-13 13:25:16 +0200
committergit <[email protected]>2024-06-13 14:25:14 +0000
commitc2f8e918150d9df17f66ac03713499f3a24912bf ()
tree5de60a729e62c192eaf9e929715f0eadaf0870e9 /lib
parent5c573b7652ec88995ba2a6172a10f6d98e4b2dcd (diff)
[rubygems/rubygems] Also disambiguate gems not in the first Gem.path position
https://.com/rubygems/rubygems/commit/7e6e7ccc58
-rw-r--r--lib/rubygems/basic_specification.rb7
-rw-r--r--lib/rubygems/specification.rb9
2 files changed, 14 insertions, 2 deletions
@@ -106,6 +106,13 @@ class Gem::BasicSpecification
end
##
# Returns full path to the directory where gem's extensions are installed.
def extension_dir
@@ -771,6 +771,11 @@ class Gem::Specification < Gem::BasicSpecification
end
private_class_method :clear_load_cache
def self.each_gemspec(dirs) # :nodoc:
dirs.each do |dir|
Gem::Util.glob_files_in_dir("*.gemspec", dir).each do |path|
@@ -834,7 +839,7 @@ class Gem::Specification < Gem::BasicSpecification
next platforms if platforms.nonzero?
default_gem = a.default_gem_priority <=> b.default_gem_priority
next default_gem if default_gem.nonzero?
- b.base_dir == Gem.path.first ? 1 : -1
end
end
@@ -910,7 +915,7 @@ class Gem::Specification < Gem::BasicSpecification
# Return the directories that Specification uses to find specs.
def self.dirs
- @@dirs ||= Gem::SpecificationRecord.dirs_from(Gem.path)
end
##