ruby difference engine

后端 未结 1 1644
再見小時候
再見小時候 2021-01-16 16:31

Looking for a Ruby differencing engine. So you can do some of the same things meld viewer does.

For example you have this first set of code per line:

相关标签:
1条回答
  • 2021-01-16 17:09

    The "standard" solution is Austin Ziegler's diff-lcs library, which – as the name implies – implements a longest common subsequence algorithm. More precisely, the LCS algorithm by McIlroy and Hunt. This library is a port of Mario I. Wolczko's Smalltalk implementation of the McIlroy-Hunt algorithm from 1993 as well es the Algorithm::Diff Perl library.

    Unfortunately, there hasn't been a release since 2004. Which wouldn't be that bad, since the McIlroy-Hunt algorithm hasn't changed since 1976, but String handling in Ruby has changed significantly in Ruby 1.9.

    0 讨论(0)
提交回复
热议问题