lib/bundler/lazy_specification.rb in bundler-1.14.5 vs lib/bundler/lazy_specification.rb in bundler-1.14.6

- old
+ new

@@ -71,10 +71,10 @@ search_object = Bundler.settings[:specific_platform] || Bundler.settings[:force_ruby_platform] ? self : Dependency.new(name, version) @specification = if source.is_a?(Source::Gemspec) && source.gemspec.name == name 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." search = source.specs.search(self).last end