summaryrefslogtreecommitdiff
path: root/lib/bundler/definition.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/definition.rb')
-rw-r--r--lib/bundler/definition.rb13
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index 1a4b703aa5..4cf4f76084 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -118,7 +118,7 @@ module Bundler
end
@unlocking ||= @unlock[:ruby] ||= (!@locked_ruby_version ^ !@ruby_version)
- add_platforms unless Bundler.frozen_bundle?
+ add_current_platform unless Bundler.frozen_bundle?
converge_path_sources_to_gemspec_sources
@path_changes = converge_paths
@@ -547,17 +547,12 @@ module Bundler
private
- def add_platforms
- (@dependencies.flat_map(&:expanded_platforms) + current_platforms).uniq.each do |platform|
- add_platform(platform)
- end
+ def add_current_platform
+ current_platforms.each {|platform| add_platform(platform) }
end
def current_platforms
- [].tap do |platforms|
- platforms << local_platform if Bundler.feature_flag.specific_platform?
- platforms << generic_local_platform
- end
+ [local_platform, generic_local_platform].uniq
end
def change_reason