Created
September 2, 2014 18:36
-
-
Save keithrbennett/00900d2e6ac555c7bfd4 to your computer and use it in GitHub Desktop.
Diffy Sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'diffy' | |
s1 = "apple\npear\npapaya\nmango\n" | |
s2 = "apple\npapaya\nmango\njackfruit\n" | |
diff = Diffy::Diff.new(s1, s2).to_s | |
puts diff | |
=begin | |
Output is: | |
apple | |
-pear | |
papaya | |
mango | |
+jackfruit | |
=end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment