Specifying a table width less than the combined column widths breaks #23

Closed
avand opened this Issue Aug 21, 2012 · 3 comments

Projects

None yet

3 participants

@avand
avand commented Aug 21, 2012

I set the width of a table to less than the width of all the columns combined and got this error:

undefined local variable or method `wanted' for #<Terminal::Table:0x007fd99a490248>
/Users/avand/Code/sqoot/api/vendor/ruby/1.9.1/gems/terminal-table-1.4.5/lib/terminal-table/table.rb:169:in `additional_column_widths'
/Users/avand/Code/sqoot/api/vendor/ruby/1.9.1/gems/terminal-table-1.4.5/lib/terminal-table/table.rb:85:in `column_width'
/Users/avand/Code/sqoot/api/vendor/ruby/1.9.1/gems/terminal-table-1.4.5/lib/terminal-table/separator.rb:7:in `block in render'
/Users/avand/Code/sqoot/api/vendor/ruby/1.9.1/gems/terminal-table-1.4.5/lib/terminal-table/separator.rb:6:in `map'
/Users/avand/Code/sqoot/api/vendor/ruby/1.9.1/gems/terminal-table-1.4.5/lib/terminal-table/separator.rb:6:in `render'
/Users/avand/Code/sqoot/api/vendor/ruby/1.9.1/gems/terminal-table-1.4.5/lib/terminal-table/table.rb:120:in `block in render'
/Users/avand/Code/sqoot/api/vendor/ruby/1.9.1/gems/terminal-table-1.4.5/lib/terminal-table/table.rb:120:in `map'
/Users/avand/Code/sqoot/api/vendor/ruby/1.9.1/gems/terminal-table-1.4.5/lib/terminal-table/table.rb:120:in `render'

Looks like the exception references a non-existent variable. Should be a pretty easy fix.

@bcandrea
Contributor
bcandrea commented Mar 4, 2013

I just submitted pull request #30 that should fix this.

@nateberkopec
Collaborator

Fixed in #30

@nateberkopec nateberkopec added the bug label Apr 13, 2015
@avand
avand commented Apr 14, 2015

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment