mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/irb] Fix step's argument
cols.size was calling Integer#size, which returns 8.
Fixing a bug of https://github.com/ruby/irb/pull/209
c93ae4be71
This commit is contained in:
parent
d0b044a842
commit
75b38f1894
1 changed files with 1 additions and 1 deletions
|
@ -64,7 +64,7 @@ module IRB
|
|||
|
||||
def col_widths(strs, cols:)
|
||||
cols.times.map do |col|
|
||||
(col...strs.size).step(cols.size - 1).map do |i|
|
||||
(col...strs.size).step(cols).map do |i|
|
||||
strs[i].length
|
||||
end.max
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue