1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/lib/rubygems/dependency_resolver/installed_specification.rb
drbrain f06f903231 * lib/rubygems: Update to RubyGems 2.1.0. Fixes CVE-2013-4287.
See http://rubygems.rubyforge.org/rubygems-update/CVE-2013-4287_txt.html
  for CVE information.

  See http://rubygems.rubyforge.org/rubygems-update/History_txt.html#label-2.1.0+%2F+2013-09-09
  for release notes.

* test/rubygems:  Tests for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-10 00:52:14 +00:00

42 lines
586 B
Ruby

class Gem::DependencyResolver::InstalledSpecification
attr_reader :spec
def initialize set, spec, source=nil
@set = set
@source = source
@spec = spec
end
def == other # :nodoc:
self.class === other and
@set == other.set and
@spec == other.spec
end
def dependencies
@spec.dependencies
end
def full_name
"#{@spec.name}-#{@spec.version}"
end
def name
@spec.name
end
def platform
@spec.platform
end
def source
@source ||= Gem::Source::Installed.new
end
def version
@spec.version
end
end