summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThe Bundler Bot <bot@bundler.io>2017-02-22 12:37:39 +0000
committerThe Bundler Bot <bot@bundler.io>2017-02-22 12:37:39 +0000
commitf99067ff262352e3969ebf46b72d2a5d76f8cc7c (patch)
tree8e7c4a8ec0efac4068e259aab5fbd83d09af953f
parent5553e99a91a07bfd35925b88a5b3c9362f363841 (diff)
parent961756b517548cbd2b4252c05c06fd89c478e0ac (diff)
downloadbundler-f99067ff262352e3969ebf46b72d2a5d76f8cc7c.tar.gz
Auto merge of #5461 - bundler:seg-lazy-specification-nil-platform, r=indirect
[LazySpecification] Handle when platform is nil in __materialize__ Because a nil platform is the same as RUBY
-rw-r--r--lib/bundler/lazy_specification.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/lazy_specification.rb b/lib/bundler/lazy_specification.rb
index adafa42342..891495c1d4 100644
--- a/lib/bundler/lazy_specification.rb
+++ b/lib/bundler/lazy_specification.rb
@@ -73,7 +73,7 @@ module Bundler
source.gemspec.tap {|s| s.source = source }
else
search = source.specs.search(search_object).last
- if search && search.platform != platform && !search.runtime_dependencies.-(dependencies.reject {|d| d.type == :development }).empty?
+ if search && Gem::Platform.new(search.platform) != Gem::Platform.new(platform) && !search.runtime_dependencies.-(dependencies.reject {|d| d.type == :development }).empty?
Bundler.ui.warn "Unable to use the platform-specific (#{search.platform}) version of #{name} (#{version}) " \
"because it has different dependencies from the #{platform} version. " \
"To use the platform-specific version of the gem, run `bundle config specific_platform true` and install again."