summaryrefslogtreecommitdiff
path: root/lib/rubygems.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-04-25 11:48:40 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-08-17 07:35:48 +0900
commit3587824d710ffcfd1270be0a354a770a49312b6f (patch)
tree7b446b5cff5b8e06bc28e386afeed6abae8dbb3b /lib/rubygems.rb
parent1ac6890bd05a48e385f564d212765a3a60899659 (diff)
[rubygems/rubygems] Don't unregister default specifications
I think this should be more efficient? https://github.com/rubygems/rubygems/commit/a1de78104f
Diffstat (limited to 'lib/rubygems.rb')
-rw-r--r--lib/rubygems.rb14
1 files changed, 2 insertions, 12 deletions
diff --git a/lib/rubygems.rb b/lib/rubygems.rb
index 9440ab0..1e79e40 100644
--- a/lib/rubygems.rb
+++ b/lib/rubygems.rb
@@ -1293,18 +1293,8 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
# Find a Gem::Specification of default gem from +path+
def find_unresolved_default_spec(path)
- @path_to_default_spec_map[path]
- end
-
- ##
- # Remove needless Gem::Specification of default gem from
- # unresolved default gem list
-
- def remove_unresolved_default_spec(spec)
- spec.files.each do |file|
- @path_to_default_spec_map.delete(file)
- @path_to_default_spec_map.delete(file.sub(suffix_regexp, ""))
- end
+ default_spec = @path_to_default_spec_map[path]
+ return default_spec if default_spec && loaded_specs[default_spec.name] != default_spec
end
##