summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2016-08-23 14:10:40 -0500
committerSamuel Giddins <segiddins@segiddins.me>2016-08-25 11:16:58 -0500
commiteab72a0819cd140d1c4d74134623e94fdf03f858 (patch)
tree3e7a1163c06cc091f4cfb738a9cf4bfaf35e1d1b
parenta8462799055044fefa4c2df707ed1dd52db6c56b (diff)
downloadbundler-eab72a0819cd140d1c4d74134623e94fdf03f858.tar.gz
[Definition] Only add current platform if not frozen
-rw-r--r--lib/bundler/definition.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index 705576c5fc..8e9ec8b585 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -104,9 +104,7 @@ module Bundler
@gem_version_promoter = create_gem_version_promoter
- current_platform = Bundler.rubygems.platforms.last
- add_platform(current_platform) if Bundler.settings[:specific_platform]
- add_platform(generic(current_platform))
+ add_current_platform unless Bundler.settings[:frozen]
@path_changes = converge_paths
eager_unlock = expand_dependencies(@unlock[:gems])
@@ -505,6 +503,12 @@ module Bundler
raise InvalidOption, "Unable to remove the platform `#{platform}` since the only platforms are #{@platforms.join ", "}"
end
+ def add_current_platform
+ current_platform = Bundler.rubygems.platforms.last
+ add_platform(current_platform) if Bundler.settings[:specific_platform]
+ add_platform(generic(current_platform))
+ end
+
attr_reader :sources
private :sources