Sounds like the solution here should be to set percent_run to 0 if total_lines is zero, no?

```ruby
if total_lines.zero?
  percent_run = 0
else
 percent_run = (Float(lines_run) / Float(total_lines) * 100).round
end
```

This will crash if lines_run or total_lines are not Numeric.  If that's the case, something is wrong, but I suppose to_f would be better for now.