[rubygems/rubygems] Split finding and removing invalid platforms
I don't like traversing the array and modifying it at the same time while it seems to work. https://github.com/rubygems/rubygems/commit/6551c74c27
This commit is contained in:
parent
f8720b01d9
commit
91df1795c5
@ -1137,16 +1137,17 @@ module Bundler
|
||||
def remove_invalid_platforms!
|
||||
return if Bundler.frozen_bundle?
|
||||
|
||||
platforms.reverse_each do |platform|
|
||||
invalid_platforms = platforms.select do |platform|
|
||||
next if local_platform == platform ||
|
||||
@new_platforms.include?(platform) ||
|
||||
@path_changes ||
|
||||
@dependency_changes ||
|
||||
@locked_spec_with_invalid_deps ||
|
||||
!spec_set_incomplete_for_platform?(@originally_locked_specs, platform)
|
||||
@locked_spec_with_invalid_deps
|
||||
|
||||
remove_platform(platform)
|
||||
spec_set_incomplete_for_platform?(@originally_locked_specs, platform)
|
||||
end
|
||||
|
||||
@platforms -= invalid_platforms
|
||||
end
|
||||
|
||||
def spec_set_incomplete_for_platform?(spec_set, platform)
|
||||
|
Loading…
x
Reference in New Issue
Block a user