Permalink
Browse files

Fixed failing TestCase for iso-8859 encoded files with Umlauts.

  • Loading branch information...
1 parent fbfdf39 commit 0d9ae3ffe2f78eef741d941b6e8f91d577478290 @Deradon committed Mar 19, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/simplecov/source_file.rb
@@ -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
@@ -172,3 +173,4 @@ def round_float(float, places)
end
end
end
+

0 comments on commit 0d9ae3f

Please sign in to comment.