summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSutou Kouhei <kou@clear-code.com>2020-01-15 06:45:25 +0900
committerSutou Kouhei <kou@clear-code.com>2020-01-15 06:45:25 +0900
commitfd11bd3089122ea332e0637fa00d4b0149c2b53f (patch)
tree388e492e5a476a521d073aa7a63ac38305c27e44 /lib
parent637b695640b147061a04b5c11ed3de4ec7a656c0 (diff)
downloadbundler-fd11bd3089122ea332e0637fa00d4b0149c2b53f.tar.gz
Always add "ruby" version to selected spec groups as fallback
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/resolver.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/bundler/resolver.rb b/lib/bundler/resolver.rb
index 8a95273a0f..d9c31a7645 100644
--- a/lib/bundler/resolver.rb
+++ b/lib/bundler/resolver.rb
@@ -151,7 +151,8 @@ module Bundler
spec = sg.spec_for(platform)
next if spec.nil?
spec_platform = spec.platform
- if spec_platform && spec_platform != Gem::Platform::RUBY
+ if (spec_platform && spec_platform != Gem::Platform::RUBY) ||
+ platform != Gem::Platform::RUBY
# Add a spec group for "non platform specific spec" as the fallback
# spec group.
sg_ruby = sg.copy_for(Gem::Platform::RUBY)
@@ -173,8 +174,9 @@ module Bundler
selected_sgs << sg_ruby_platform
end
end
- sg.activate_platform!(platform)
- selected_sgs << sg
+ sg_platform = sg.copy_for(platform)
+ sg_platform.activate_platform!(platform)
+ selected_sgs << sg_platform
end
selected_sgs
end