diff options
-rw-r--r-- | lib/bundler/match_platform.rb | 5 | ||||
-rw-r--r-- | spec/install/gems/resolving_spec.rb | 14 |
2 files changed, 9 insertions, 10 deletions
diff --git a/lib/bundler/match_platform.rb b/lib/bundler/match_platform.rb index 81d85d8e46..69074925a6 100644 --- a/lib/bundler/match_platform.rb +++ b/lib/bundler/match_platform.rb @@ -15,10 +15,7 @@ module Bundler return true if Gem::Platform::RUBY == gemspec_platform return true if local_platform == gemspec_platform gemspec_platform = Gem::Platform.new(gemspec_platform) - generic_gemspec_platform = GemHelpers.generic(gemspec_platform) - unless generic_gemspec_platform == Gem::Platform::RUBY - return true if generic_gemspec_platform === local_platform - end + return true if GemHelpers.generic(gemspec_platform) === local_platform return true if gemspec_platform === local_platform false diff --git a/spec/install/gems/resolving_spec.rb b/spec/install/gems/resolving_spec.rb index 1c7554700a..2f46661058 100644 --- a/spec/install/gems/resolving_spec.rb +++ b/spec/install/gems/resolving_spec.rb @@ -150,17 +150,19 @@ RSpec.describe "bundle install with install-time dependencies" do s.required_ruby_version = "> 9000" end build_gem "rack", "1.2" do |s| - s.platform = Bundler.local_platform + s.platform = mingw s.required_ruby_version = "> 9000" end build_gem "rack", "1.2" end - install_gemfile <<-G, :artifice => "compact_index_rate_limited", :env => { "BUNDLER_SPEC_GEM_REPO" => gem_repo4.to_s } - ruby "#{RUBY_VERSION}" - source "http://localgemserver.test/" - gem 'rack' - G + simulate_platform mingw do + install_gemfile <<-G, :artifice => "compact_index_rate_limited", :env => { "BUNDLER_SPEC_GEM_REPO" => gem_repo4.to_s } + ruby "#{RUBY_VERSION}" + source "http://localgemserver.test/" + gem 'rack' + G + end expect(out).to_not include("rack-9001.0.0 requires ruby version > 9000") expect(out).to_not include("rack-1.2-#{Bundler.local_platform} requires ruby version > 9000") |