diff options
| author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2024-07-25 18:37:57 +0200 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2024-07-30 14:02:02 +0000 |
| commit | cf6efd1bb77907825bb42ea305214ef415ae3382 (patch) | |
| tree | dec3abd9f878879cc5534908b3b198c8d560556c /lib | |
| parent | 1164b6a7baeddade88b9eb01c3ac00f83d2066c6 (diff) | |
[rubygems/rubygems] Simplify logic to add current platform a bit
https://github.com/rubygems/rubygems/commit/e102516e27
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/bundler/definition.rb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index 8014056c23..a96fd36b6a 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -671,19 +671,18 @@ module Bundler end def add_current_platform - @most_specific_non_local_locked_ruby_platform = find_most_specific_non_local_locked_ruby_platform + return if @platforms.include?(local_platform) + + @most_specific_non_local_locked_ruby_platform = find_most_specific_locked_ruby_platform return if @most_specific_non_local_locked_ruby_platform add_platform(local_platform) end - def find_most_specific_non_local_locked_ruby_platform + def find_most_specific_locked_ruby_platform return unless generic_local_platform_is_ruby? && current_platform_locked? - most_specific_locked_ruby_platform = most_specific_locked_platform - return unless most_specific_locked_ruby_platform != local_platform - - most_specific_locked_ruby_platform + most_specific_locked_platform end def change_reason |
