Skip to content

Commit

Permalink
Remove some variable and method redefinition warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosantoniodasilva committed May 19, 2012
1 parent 2373c1f commit ea412cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/thor/group.rb
Expand Up @@ -180,7 +180,7 @@ def get_options_from_invocations(group_options, base_options) #:nodoc:
end
next unless value

klass, task = prepare_for_invocation(name, value)
klass, _ = prepare_for_invocation(name, value)
next unless klass && klass.respond_to?(:class_options)

value = value.to_s
Expand Down
5 changes: 3 additions & 2 deletions lib/thor/shell/basic.rb
Expand Up @@ -3,7 +3,8 @@
class Thor
module Shell
class Basic
attr_accessor :base, :padding
attr_accessor :base
attr_reader :padding

# Initialize base, mute and padding to nil.
#
Expand Down Expand Up @@ -147,7 +148,7 @@ def print_table(array, options={})
start.upto(colcount - 1) do |index|
maxima = array.map {|row| row[index] ? row[index].to_s.size : 0 }.max
maximas << maxima
if index == colcount -1
if index == colcount - 1
# Don't output 2 trailing spaces when printing the last column
formats << "%-s"
else
Expand Down

0 comments on commit ea412cd

Please sign in to comment.