Skip to content

Instantly share code, notes, and snippets.

@opensussex
Created December 23, 2016 11:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save opensussex/f72d7ccaf305b41410428a1401704e8c to your computer and use it in GitHub Desktop.
Save opensussex/f72d7ccaf305b41410428a1401704e8c to your computer and use it in GitHub Desktop.
a very basic example of using the Diffy library to do a diff on two files.
require ('diffy')
#uses the Diffy library - https://github.com/samg/diffy
file_1, file_2 = ARGV;
file_1_text = open(file_1)
file_2_text = open(file_2)
puts Diffy::Diff.new(file_1_text.read, file_2_text.read)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment