summaryrefslogtreecommitdiff
path: root/lib/bundler
diff options
context:
space:
mode:
authorDavid Rodríguez <[email protected]>2025-03-27 15:34:14 +0100
committerHiroshi SHIBATA <[email protected]>2025-03-31 09:39:22 +0900
commitf72d5effb79a9957a0abd62c4f743e67cbf8e5ed ()
treef1174904cefcc0a0ce7d4e2e4002f179f2345a3c /lib/bundler
parent91df1795c5bc9659ff7cec6c8f5a1b3eade1145b (diff)
[rubygems/rubygems] `SpecSet#add_extra_platforms!` doesn't need to return anything
https://.com/rubygems/rubygems/commit/9fd92ade54
-rw-r--r--lib/bundler/definition.rb2
-rw-r--r--lib/bundler/spec_set.rb9
2 files changed, 6 insertions, 5 deletions
@@ -760,7 +760,7 @@ module Bundler
end
end
- @platforms = result.add_extra_platforms!(platforms) if should_add_extra_platforms?
SpecSet.new(result.for(dependencies, @platforms | [Gem::Platform::RUBY]))
end
@@ -48,7 +48,10 @@ module Bundler
end
def add_extra_platforms!(platforms)
- return platforms.concat([Gem::Platform::RUBY]).uniq if @specs.empty?
new_platforms = all_platforms.select do |platform|
next if platforms.include?(platform)
@@ -56,14 +59,12 @@ module Bundler
complete_platform(platform)
end
- return platforms if new_platforms.empty?
platforms.concat(new_platforms)
less_specific_platform = new_platforms.find {|platform| platform != Gem::Platform::RUBY && Bundler.local_platform === platform && platform === Bundler.local_platform }
platforms.delete(Bundler.local_platform) if less_specific_platform
-
- platforms
end
def validate_deps(s)