mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rubygems: Update to RubyGems 2.4.5.
* test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a0b80a4410
commit
97f80207d0
32 changed files with 458 additions and 103 deletions
|
@ -42,6 +42,7 @@ class Gem::StubSpecification < Gem::BasicSpecification
|
|||
self.loaded_from = filename
|
||||
@data = nil
|
||||
@extensions = nil
|
||||
@name = nil
|
||||
@spec = nil
|
||||
end
|
||||
|
||||
|
@ -49,8 +50,11 @@ class Gem::StubSpecification < Gem::BasicSpecification
|
|||
# True when this gem has been activated
|
||||
|
||||
def activated?
|
||||
loaded = Gem.loaded_specs[name]
|
||||
loaded && loaded.version == version
|
||||
@activated ||=
|
||||
begin
|
||||
loaded = Gem.loaded_specs[name]
|
||||
loaded && loaded.version == version
|
||||
end
|
||||
end
|
||||
|
||||
def build_extensions # :nodoc:
|
||||
|
@ -154,9 +158,11 @@ class Gem::StubSpecification < Gem::BasicSpecification
|
|||
# The full Gem::Specification for this gem, loaded from evalling its gemspec
|
||||
|
||||
def to_spec
|
||||
@spec ||= Gem.loaded_specs.values.find { |spec|
|
||||
spec.name == @name and spec.version == @version
|
||||
}
|
||||
@spec ||= if @data then
|
||||
Gem.loaded_specs.values.find { |spec|
|
||||
spec.name == name and spec.version == version
|
||||
}
|
||||
end
|
||||
|
||||
@spec ||= Gem::Specification.load(loaded_from)
|
||||
@spec.ignored = @ignored if instance_variable_defined? :@ignored
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue