mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[rubygems/rubygems] Don't unregister default specifications
I think this should be more efficient? https://github.com/rubygems/rubygems/commit/a1de78104f
This commit is contained in:
parent
1ac6890bd0
commit
3587824d71
2 changed files with 2 additions and 13 deletions
|
@ -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
|
||||
|
||||
##
|
||||
|
|
|
@ -57,7 +57,6 @@ module Kernel
|
|||
end
|
||||
|
||||
if spec = Gem.find_unresolved_default_spec(path)
|
||||
Gem.remove_unresolved_default_spec(spec)
|
||||
begin
|
||||
Kernel.send(:gem, spec.name, "#{Gem::Requirement.default}.a")
|
||||
rescue Exception
|
||||
|
|
Loading…
Add table
Reference in a new issue