Class: Gem::Specification

Inherits:
Object
  • Object
show all
Defined in:
lib/logstash/patches/rubygems.rb

Class Method Summary collapse

Class Method Details

.resetObject



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/logstash/patches/rubygems.rb', line 15

def self.reset
  @@dirs = nil
  ::Gem.pre_reset_hooks.each { |hook| hook.call }
  @@all = nil
  @@stubs = nil
  _clear_load_cache
  unresolved = unresolved_deps
  unless unresolved.empty?
    unless (unresolved.size == 1 && unresolved["ffi"])
      w = "W" + "ARN"
      warn "#{w}: Unresolved specs during Gem::Specification.reset:"
      unresolved.values.each do |dep|
        warn "      #{dep}"
      end
      warn "#{w}: Clearing out unresolved specs."
      warn "Please report a bug if this causes problems."
    end
    unresolved.clear
  end
  ::Gem.post_reset_hooks.each { |hook| hook.call }
end