fix warnings: splat is redundant for puts
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
parent
1e41264f42
commit
6ff5e194c7
@ -537,7 +537,7 @@ private
|
||||
when 0
|
||||
# noop
|
||||
when 1
|
||||
puts *files
|
||||
puts files
|
||||
else
|
||||
puts "#{root}/ (#{files.length} #{other}files)"
|
||||
end
|
||||
|
||||
@ -63,7 +63,7 @@ end
|
||||
def ohai title, *sput
|
||||
title = title.to_s[0, `/usr/bin/tput cols`.strip.to_i-4] unless ARGV.verbose?
|
||||
puts "#{Tty.blue}==>#{Tty.white} #{title}#{Tty.reset}"
|
||||
puts *sput unless sput.empty?
|
||||
puts sput unless sput.empty?
|
||||
end
|
||||
|
||||
def opoo warning
|
||||
@ -73,7 +73,7 @@ end
|
||||
def onoe error
|
||||
lines = error.to_s.split'\n'
|
||||
puts "#{Tty.red}Error#{Tty.reset}: #{lines.shift}"
|
||||
puts *lines unless lines.empty?
|
||||
puts lines unless lines.empty?
|
||||
end
|
||||
|
||||
def pretty_duration s
|
||||
@ -140,7 +140,7 @@ def puts_columns items, cols = 4
|
||||
|
||||
IO.popen("/usr/bin/pr -#{cols} -t -w#{console_width}", "w"){|io| io.puts(items) }
|
||||
else
|
||||
puts *items
|
||||
puts items
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
12
bin/brew
12
bin/brew
@ -81,13 +81,13 @@ begin
|
||||
if ARGV.named.empty?
|
||||
puts HOMEBREW_CACHE
|
||||
else
|
||||
puts *ARGV.formulae.collect {|f| f.cached_download}
|
||||
puts ARGV.formulae.collect {|f| f.cached_download}
|
||||
end
|
||||
when '--prefix'
|
||||
if ARGV.named.empty?
|
||||
puts HOMEBREW_PREFIX
|
||||
else
|
||||
puts *ARGV.formulae.collect {|f| f.prefix}
|
||||
puts ARGV.formulae.collect {|f| f.prefix}
|
||||
end
|
||||
when '--repository'
|
||||
puts HOMEBREW_REPOSITORY
|
||||
@ -95,7 +95,7 @@ begin
|
||||
if ARGV.named.empty?
|
||||
puts HOMEBREW_CELLAR
|
||||
else
|
||||
puts *ARGV.formulae.collect {|f| HOMEBREW_CELLAR+f.name}
|
||||
puts ARGV.formulae.collect {|f| HOMEBREW_CELLAR+f.name}
|
||||
end
|
||||
when '--config'
|
||||
dump_config
|
||||
@ -287,7 +287,7 @@ begin
|
||||
if ARGV.include? "--installed"
|
||||
uses = uses.select { |f| f = HOMEBREW_CELLAR+f; f.directory? and not f.subdirs.empty? }
|
||||
end
|
||||
puts *uses.sort
|
||||
puts uses.sort
|
||||
|
||||
when 'deps'
|
||||
if ARGV.include?('--all')
|
||||
@ -296,10 +296,10 @@ begin
|
||||
puts "#{f.name}:#{f.deps.join(' ')}"
|
||||
end
|
||||
elsif ARGV.include?("-1") or ARGV.include?("--1")
|
||||
puts *ARGV.formulae.map{ |f| f.deps or [] }.flatten.uniq.sort
|
||||
puts ARGV.formulae.map {|f| f.deps or []}.flatten.uniq.sort
|
||||
else
|
||||
require 'formula_installer'
|
||||
puts *ARGV.formulae.map{ |f| FormulaInstaller.expand_deps(f).map{|f| f.name} }.flatten.uniq.sort
|
||||
puts ARGV.formulae.map {|f| FormulaInstaller.expand_deps(f).map {|f| f.name} }.flatten.uniq.sort
|
||||
end
|
||||
|
||||
when 'cat'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user