wbailey / command_line_reporter

A gem for making it easy to produce a report while a ruby script is executing
Apache License 2.0
432 stars 23 forks source link

spacing == 0 issue #20

Closed yoris closed 9 years ago

yoris commented 9 years ago

Param spacing => 0 doesn't work for table (only if param >0 it works ok)

Fixed for myself by adding

if lines != 0

to _verticalspacing function:

  def vertical_spacing(lines = 1)
    puts "\n" * lines if lines != 0
  rescue
    raise ArgumentError
  end
wbailey commented 9 years ago

I am not seeing the issue with zero that you propose. For example:

2.2.0 :013 > puts "\n" * 0

 => nil
2.2.0 :014 >
wbailey commented 9 years ago

OK, I get it. I have pushed an update and tagged 3.3.5 to fix this issue.