lib/rubygems/dependency.rb
##
# Valid dependency types.
#--
# When this list is updated, be sure to change
# Gem::Specification::CURRENT_SPECIFICATION_VERSION as well.
#
# REFACTOR: This type of constant, TYPES, indicates we might want
# two classes, used via inheritance or duck typing.
Valid dependency types.
When this list is updated, be sure to change
Gem::Specification::CURRENT_SPECIFICATION_VERSION as well.

This type of constant, TYPES, indicates we might want
two classes, used via inheritance or duck typing.
Valid dependency types . When this list is updated be sure to change Gem :: Specification :: CURRENT_SPECIFICATION_VERSION as well . This type of constant TYPES indicates we might want two classes used via inheritance or duck typing .
def to_spec
    matches = self.to_specs.compact
    active = matches.find {|spec| spec.activated? }
    return active if active
    unless prerelease?
      pre, matches = matches.partition {|spec| spec.version.prerelease? }
      matches += pre if requirement == Gem::Requirement.default
    end
    matches.first
  end
def to_spec matches = self . to_specs . compact active = matches . find { | spec | spec . activated? } return active if active unless prerelease? pre , matches = matches . partition { | spec | spec . version . prerelease? } matches += pre if requirement == Gem :: Requirement . default end matches . first end
Valid dependency types.
Valid dependency types .
# Move prereleases to the end of the list for >= 0 requirements