lib/undercover/result.rb in undercover-0.2.0 vs lib/undercover/result.rb in undercover-0.2.1

- old
+ new

@@ -49,13 +49,13 @@ # full source for given code fragment (this includes non-code lines!) def pretty_print_lines cov_enum = coverage.each cov_source_lines = (node.first_line..node.last_line).map do |line_no| cov_line_no = begin - cov_enum.peek[0] - rescue StopIteration - -1 - end + cov_enum.peek[0] + rescue StopIteration + -1 + end cov_enum.next[1] if cov_line_no == line_no end cov_source_lines.zip(node.source_lines_with_numbers) end