How to generate a unified diff in Ruby?
Posted
by jstayton
on Stack Overflow
See other posts from Stack Overflow
or by jstayton
Published on 2010-04-30T03:50:59Z
Indexed on
2010/04/30
3:57 UTC
Read the original article
Hit count: 347
After reading through this question about Ruby diff packages, I'm still not sure how to generate a unified diff from two text files. I'm not having trouble reading each file into a string (IO.read()
), but I'm not finding any package that can generate a unified diff. Does one exist? Is doing a system call to diff
even an option I should consider? (I'm thinking no.)
Any help is appreciated! Thanks.
© Stack Overflow or respective owner