mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 21:14:23 +02:00
Use space inside block braces everywhere
To make rubygems code style consistent with bundler.
This commit is contained in:
parent
ef481c120c
commit
955f1837a1
Notes:
git
2020-06-15 21:21:04 +09:00
99 changed files with 469 additions and 469 deletions
|
@ -125,7 +125,7 @@ class Gem::Command
|
|||
@program_name = "gem #{command}"
|
||||
@defaults = defaults
|
||||
@options = defaults.dup
|
||||
@option_groups = Hash.new { |h,k| h[k] = [] }
|
||||
@option_groups = Hash.new {|h,k| h[k] = [] }
|
||||
@deprecated_options = { command => {} }
|
||||
@parser = nil
|
||||
@when_invoked = nil
|
||||
|
@ -162,7 +162,7 @@ class Gem::Command
|
|||
|
||||
if errors and !errors.empty?
|
||||
msg << ", here is why:\n"
|
||||
errors.each { |x| msg << " #{x.wordy}\n" }
|
||||
errors.each {|x| msg << " #{x.wordy}\n" }
|
||||
else
|
||||
if required_by and gem != required_by
|
||||
msg << " (required by #{required_by}) in any repository"
|
||||
|
@ -192,7 +192,7 @@ class Gem::Command
|
|||
"Please specify at least one gem name (e.g. gem build GEMNAME)"
|
||||
end
|
||||
|
||||
args.select { |arg| arg !~ /^-/ }
|
||||
args.select {|arg| arg !~ /^-/ }
|
||||
end
|
||||
|
||||
##
|
||||
|
@ -364,7 +364,7 @@ class Gem::Command
|
|||
|
||||
def remove_option(name)
|
||||
@option_groups.each do |_, option_list|
|
||||
option_list.reject! { |args, _| args.any? { |x| x.is_a?(String) && x =~ /^#{name}/ } }
|
||||
option_list.reject! {|args, _| args.any? {|x| x.is_a?(String) && x =~ /^#{name}/ } }
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -417,7 +417,7 @@ class Gem::Command
|
|||
|
||||
def merge_options(new_options)
|
||||
@options = @defaults.clone
|
||||
new_options.each { |k,v| @options[k] = v }
|
||||
new_options.each {|k,v| @options[k] = v }
|
||||
end
|
||||
|
||||
##
|
||||
|
@ -496,7 +496,7 @@ class Gem::Command
|
|||
|
||||
configure_options "", regular_options
|
||||
|
||||
@option_groups.sort_by { |n,_| n.to_s }.each do |group_name, option_list|
|
||||
@option_groups.sort_by {|n,_| n.to_s }.each do |group_name, option_list|
|
||||
@parser.separator nil
|
||||
configure_options group_name, option_list
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue