When a line on the left side of a diff starts with --, the line is dropped from the diff. When running puts Diffy::Diff.new("aa\n--\ncc\n", "aa\nbb\ncc\n") you get:
aa
+bb
cc
but you'd expect:
aa
---
+bb
cc
More examples:
puts Diffy::Diff.new("a a\n-- b\nc c", "a a\nb b\nc c") # fails
puts Diffy::Diff.new("a a\n- b\nc c", "a a\nb b\nc c") # works
puts Diffy::Diff.new("a\n-\nc", "a\nb\nc") # works
puts Diffy::Diff.new("a\n---\nc", "a\n----\nc") # fails
Diffy's been serving us really well otherwise, btw, so thanks for the great work!
When a line on the left side of a diff starts with
--
, the line is dropped from the diff. When runningputs Diffy::Diff.new("aa\n--\ncc\n", "aa\nbb\ncc\n")
you get:but you'd expect:
More examples:
Diffy's been serving us really well otherwise, btw, so thanks for the great work!