diff options
author | Sutou Kouhei <kou@clear-code.com> | 2020-01-09 14:49:17 +0900 |
---|---|---|
committer | Sutou Kouhei <kou@clear-code.com> | 2020-01-15 06:27:03 +0900 |
commit | 500bb685cd75b919e72f0068565fd6112f33ce09 (patch) | |
tree | 86e70693e8d3bf3d3247225767904d59d3203183 /lib/bundler/resolver.rb | |
parent | e008edb4873aca89fe4aee079a89bd9b2dcdcfd4 (diff) | |
download | bundler-500bb685cd75b919e72f0068565fd6112f33ce09.tar.gz |
Add SpecGroup#copy_for
Diffstat (limited to 'lib/bundler/resolver.rb')
-rw-r--r-- | lib/bundler/resolver.rb | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/bundler/resolver.rb b/lib/bundler/resolver.rb index b23947f32c..a2ac4ef4ab 100644 --- a/lib/bundler/resolver.rb +++ b/lib/bundler/resolver.rb @@ -153,12 +153,8 @@ module Bundler if spec_platform && spec_platform != Gem::Platform::RUBY # Add a spec group for "non platform specific spec" as the fallback # spec group. - sg_ruby = SpecGroup.new(sg.all_specs) - sg_ruby.ignores_bundler_dependencies = sg.ignores_bundler_dependencies - if sg_ruby.for?(Gem::Platform::RUBY) - sg_ruby.activate_platform!(Gem::Platform::RUBY) - selected_sgs << sg_ruby - end + sg_ruby = sg.copy_for(Gem::Platform::RUBY) + selected_sgs << sg_ruby if sg_ruby end if platform != Gem::Platform::RUBY # Add a spec group for ["non platform specific spec", "platform @@ -170,11 +166,8 @@ module Bundler # specs: # ffi (1.9.14) # ffi (1.9.14-x86-mingw32) - sg_ruby_platform = SpecGroup.new(sg.all_specs) - sg_ruby_platform.ignores_bundler_dependencies = - sg.ignores_bundler_dependencies - if sg_ruby_platform.for?(Gem::Platform::RUBY) - sg_ruby_platform.activate_platform!(Gem::Platform::RUBY) + sg_ruby_platform = sg.copy_for(Gem::Platform::RUBY) + if sg_ruby_platform sg_ruby_platform.activate_platform!(platform) selected_sgs << sg_ruby_platform end |