ruby-win32/lib/ruby/site_ruby/1.8/rubygems/commands/dependency_command.rb
def find_reverse_dependencies(spec, source_index)
    result = []

    source_index.each do |name, sp|
      sp.dependencies.each do |dep|
        dep = Gem::Dependency.new(*dep) unless Gem::Dependency === dep

        if spec.name == dep.name and
           dep.version_requirements.satisfied_by?(spec.version) then
          result << [sp.full_name, dep]
        end
      end
    end

    result
  end
# Retuns list of [specification, dep] that are satisfied by spec.
Retuns list of [specification, dep] that are satisfied by spec.
Retuns list of [ specification dep ] that are satisfied by spec .
def find_reverse_dependencies(spec, source_index)
    result = []
    source_index.each do |name, sp|
      sp.dependencies.each do |dep|
        dep = Gem::Dependency.new(*dep) unless Gem::Dependency === dep
        if spec.name == dep.name and
           dep.version_requirements.satisfied_by?(spec.version) then
          result << [sp.full_name, dep]
        end
      end
    end
    result
  end
def find_reverse_dependencies ( spec , source_index ) result = [ ] source_index . each do | name , sp | sp . dependencies . each do | dep | dep = Gem :: Dependency . new ( * dep ) unless Gem :: Dependency === dep if spec . name == dep . name and dep . version_requirements . satisfied_by? ( spec . version ) then result << [ sp . full_name , dep ] end end end result end
Retuns list of [specification, dep] that are satisfied by spec.
Retuns list of [ specification dep ] that are satisfied by spec .
spec
source_index