summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <[email protected]>2025-03-24 17:19:09 +0100
committerHiroshi SHIBATA <[email protected]>2025-03-31 09:39:22 +0900
commit91df1795c5bc9659ff7cec6c8f5a1b3eade1145b ()
treee686b9b41846b7defaaff6a911cc8eb672093856
parentf8720b01d9500d890a5b2a499c5126b83951c3cb (diff)
[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://.com/rubygems/rubygems/commit/6551c74c27
-rw-r--r--lib/bundler/definition.rb9
1 files changed, 5 insertions, 4 deletions
@@ -1137,16 +1137,17 @@ module Bundler
def remove_invalid_platforms!
return if Bundler.frozen_bundle?
- platforms.reverse_each 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)
- remove_platform(platform)
end
end
def spec_set_incomplete_for_platform?(spec_set, platform)