aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/specification.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-04 00:29:40 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-04 00:29:40 +0000
commite373d99f356779c1823c81603eaee6ed71cf68f5 (patch)
treee15086587f691a1f5bd3c7ddbfa38e825828caf6 /lib/rubygems/specification.rb
parent984ea2cb815c33cfd50eb103a604e1c7462069a2 (diff)
downloadruby-e373d99f356779c1823c81603eaee6ed71cf68f5.tar.gz
* lib/rubygems.rb, lib/rubygems/*, test/rubygems/*: Update rubygems-2.6.1.
Please see entries of 2.6.0 and 2.6.1 on https://github.com/rubygems/rubygems/blob/master/History.txt [fix GH-1270] Patch by @segiddins git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/specification.rb')
-rw-r--r--lib/rubygems/specification.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
index 8e2557cdb2..8ff6299a41 100644
--- a/lib/rubygems/specification.rb
+++ b/lib/rubygems/specification.rb
@@ -1684,6 +1684,8 @@ class Gem::Specification < Gem::BasicSpecification
(conflicts[spec] ||= []) << dep
end
}
+ env_req = Gem.env_requirement(name)
+ (conflicts[self] ||= []) << env_req unless env_req.satisfied_by? version
conflicts
end
@@ -1701,6 +1703,7 @@ class Gem::Specification < Gem::BasicSpecification
# Return true if there are possible conflicts against the currently loaded specs.
def has_conflicts?
+ return true unless Gem.env_requirement(name).satisfied_by?(version)
self.dependencies.any? { |dep|
if dep.runtime? then
spec = Gem.loaded_specs[dep.name]