fix diff bug with utf-8

This commit is contained in:
Saito 2011-11-18 20:16:59 +08:00
parent 139c4c2f18
commit 4281704fb3

View file

@ -2,7 +2,7 @@
- line_new = 0 - line_new = 0
- lines_arr = diff.diff.lines.to_a - lines_arr = diff.diff.lines.to_a
- lines_arr.each do |line| - lines_arr.each do |line|
- line = line.force_encoding(Encoding::UTF_8) - line.force_encoding(Encoding::UTF_8)
- next if line.match(/^--- \/dev\/null/) - next if line.match(/^--- \/dev\/null/)
- next if line.match(/^--- a/) - next if line.match(/^--- a/)
- next if line.match(/^\+\+\+ b/) - next if line.match(/^\+\+\+ b/)