Skip to content

Commit

Permalink
Fixed failing TestCase for iso-8859 encoded files with Umlauts.
Browse files Browse the repository at this point in the history
  • Loading branch information
Deradon committed Mar 19, 2012
1 parent fbfdf39 commit 0d9ae3f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/simplecov/source_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def initialize(src, line_number, coverage)
raise ArgumentError, "Only Fixnum and nil accepted for coverage" unless coverage.kind_of?(Fixnum) or coverage.nil?
@src, @line_number, @coverage = src, line_number, coverage
@skipped = false
@src.encode!('UTF-8', 'UTF-8', :invalid => :replace) if @src.respond_to?(:encode!)
end

# Returns true if this is a line that should have been covered, but was not
Expand Down Expand Up @@ -172,3 +173,4 @@ def round_float(float, places)
end
end
end

0 comments on commit 0d9ae3f

Please sign in to comment.