使用diff ruby​​ gem来查找两个文件之间差异的示例 [英] Example for using diff ruby gem to find difference between two files

查看:101
本文介绍了使用diff ruby​​ gem来查找两个文件之间差异的示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人能给我一个例子来找出Ruby中两个文本文件的区别。我无法弄清楚如何使用 diff ruby​​ gem。知道如何在原始文件上应用diff输出并获取最新文件将会很棒。我尝试过查看 patchr gem的文档,但没有提供任何东西。

解决方案

我建议您尝试 diffy


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.

解决方案

I suggest that you try diffy instead.

这篇关于使用diff ruby​​ gem来查找两个文件之间差异的示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆