Parent

Methods

Gem::SourceIndex

Public Instance Methods

add_spec(gem_spec) click to toggle source

Overwrite this so that a gem of the same name and version won’t push one from the gems directory out entirely.

@param gem_spec<Gem::Specification> The specification of the gem to add.

# File lib/extlib/rubygems.rb, line 13
def add_spec(gem_spec)
  unless gem_spec.instance_variable_get("@loaded_from") &&
    @gems[gem_spec.full_name].is_a?(Gem::Specification) &&
    @gems[gem_spec.full_name].installation_path ==
      File.join(defined?(Merb) && Merb.respond_to?(:root) ? Merb.root : Dir.pwd,"gems")

    @gems[gem_spec.full_name] = gem_spec
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.