[rubygems/rubygems] SpecSet#add_extra_platforms!
doesn't need to return anything
https://github.com/rubygems/rubygems/commit/9fd92ade54
This commit is contained in:
parent
91df1795c5
commit
f72d5effb7
@ -760,7 +760,7 @@ module Bundler
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@platforms = result.add_extra_platforms!(platforms) if should_add_extra_platforms?
|
result.add_extra_platforms!(platforms) if should_add_extra_platforms?
|
||||||
|
|
||||||
SpecSet.new(result.for(dependencies, @platforms | [Gem::Platform::RUBY]))
|
SpecSet.new(result.for(dependencies, @platforms | [Gem::Platform::RUBY]))
|
||||||
end
|
end
|
||||||
|
@ -48,7 +48,10 @@ module Bundler
|
|||||||
end
|
end
|
||||||
|
|
||||||
def add_extra_platforms!(platforms)
|
def add_extra_platforms!(platforms)
|
||||||
return platforms.concat([Gem::Platform::RUBY]).uniq if @specs.empty?
|
if @specs.empty?
|
||||||
|
platforms.concat([Gem::Platform::RUBY]).uniq
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
new_platforms = all_platforms.select do |platform|
|
new_platforms = all_platforms.select do |platform|
|
||||||
next if platforms.include?(platform)
|
next if platforms.include?(platform)
|
||||||
@ -56,14 +59,12 @@ module Bundler
|
|||||||
|
|
||||||
complete_platform(platform)
|
complete_platform(platform)
|
||||||
end
|
end
|
||||||
return platforms if new_platforms.empty?
|
return if new_platforms.empty?
|
||||||
|
|
||||||
platforms.concat(new_platforms)
|
platforms.concat(new_platforms)
|
||||||
|
|
||||||
less_specific_platform = new_platforms.find {|platform| platform != Gem::Platform::RUBY && Bundler.local_platform === platform && platform === Bundler.local_platform }
|
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.delete(Bundler.local_platform) if less_specific_platform
|
||||||
|
|
||||||
platforms
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def validate_deps(s)
|
def validate_deps(s)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user