diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2022-01-17 15:16:34 +0100 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-01-19 11:20:36 +0900 |
commit | f04954d95c8a729d70be1c883617534a2e7cc239 (patch) | |
tree | 61146129066534cd6c29895ab45869f351be9640 /lib/rubygems/commands/pristine_command.rb | |
parent | a892e5599ec8ec441a8d8b878efa855ef283ed08 (diff) |
[rubygems/rubygems] Normalize end alignment style with Bundler
https://github.com/rubygems/rubygems/commit/f7f504b24c
Diffstat (limited to 'lib/rubygems/commands/pristine_command.rb')
-rw-r--r-- | lib/rubygems/commands/pristine_command.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/rubygems/commands/pristine_command.rb b/lib/rubygems/commands/pristine_command.rb index 13979b0a59..3cf496ba5b 100644 --- a/lib/rubygems/commands/pristine_command.rb +++ b/lib/rubygems/commands/pristine_command.rb @@ -98,20 +98,20 @@ extensions will be restored. def execute specs = if options[:all] - Gem::Specification.map + Gem::Specification.map - # `--extensions` must be explicitly given to pristine only gems - # with extensions. - elsif options[:extensions_set] and + # `--extensions` must be explicitly given to pristine only gems + # with extensions. + elsif options[:extensions_set] and options[:extensions] and options[:args].empty? - Gem::Specification.select do |spec| - spec.extensions and not spec.extensions.empty? - end - else - get_all_gem_names.sort.map do |gem_name| - Gem::Specification.find_all_by_name(gem_name, options[:version]).reverse - end.flatten - end + Gem::Specification.select do |spec| + spec.extensions and not spec.extensions.empty? + end + else + get_all_gem_names.sort.map do |gem_name| + Gem::Specification.find_all_by_name(gem_name, options[:version]).reverse + end.flatten + end specs = specs.select{|spec| RUBY_ENGINE == spec.platform || Gem::Platform.local === spec.platform || spec.platform == Gem::Platform::RUBY } |