Example for using diff ruby gem to find difference between two files
问题 Can someone give me an example to find the difference between two text files in Ruby. I am not able to figure out how to use the diff ruby gem. Also it would be great to know how to apply the diff output on the original file and get the latest file. I tried looking at the documentation for patchr gem but there was nothing available. 回答1: I suggest that you try diffy instead. 来源: https://stackoverflow.com/questions/4925127/example-for-using-diff-ruby-gem-to-find-difference-between-two-files