lib/ruby/shared/rubygems/specification.rb
##
# Activate all unambiguously resolved runtime dependencies of this
# spec. Add any ambiguous dependencies to the unresolved list to be
# resolved later, as needed.
Activate all unambiguously resolved runtime dependencies of this
spec. Add any ambiguous dependencies to the unresolved list to be
resolved later, as needed.
Activate all unambiguously resolved runtime dependencies of this spec . Add any ambiguous dependencies to the unresolved list to be resolved later as needed .
def activate_dependencies
    unresolved = Gem::Specification.unresolved_deps
    self.runtime_dependencies.each do |spec_dep|
      if loaded = Gem.loaded_specs[spec_dep.name]
        next if spec_dep.matches_spec? loaded
        msg = "can't satisfy '#{spec_dep}', already activated '#{loaded.full_name}'"
        e = Gem::LoadError.new msg
        e.name = spec_dep.name
        raise e
      end
      specs = spec_dep.to_specs
      if specs.size == 1 then
        specs.first.activate
      else
        name = spec_dep.name
        unresolved[name] = unresolved[name].merge spec_dep
      end
    end
    unresolved.delete self.name
  end
def activate_dependencies unresolved = Gem :: Specification . unresolved_deps self . runtime_dependencies . each do | spec_dep | if loaded = Gem . loaded_specs [ spec_dep . name ] next if spec_dep . matches_spec? loaded msg = "can't satisfy '#{spec_dep}', already activated '#{loaded.full_name}'" e = Gem :: LoadError . new msg e . name = spec_dep . name raise e end specs = spec_dep . to_specs if specs . size == 1 then specs . first . activate else name = spec_dep . name unresolved [ name ] = unresolved [ name ] . merge spec_dep end end unresolved . delete self . name end
Activate all unambiguously resolved runtime dependencies of this
spec.
Activate all unambiguously resolved runtime dependencies of this spec .