Registry / utility / diff-lcs

diff-lcs

JSON →
library2.0.0rbrubygemsunverified

Diff::LCS computes the difference between two Enumerable sequences using the McIlroy-Hunt longest common subsequence (LCS) algorithm.

gem install diff-lcs
INSTALL
IMPORT
SIG · DIFF-LCS
D
diff-lcs
utilityrubyv2.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Diff::LCS
require 'diff/lcs'

Compute the differences between two strings.

require 'diff/lcs' diffs = Diff::LCS.diff('abc', 'abd') puts diffs.map(&:to_s)
Debug
Known issues
breakingVersion 2.0 requires Ruby 3.2 or higher and removes deprecated APIs.
fix
Upgrade to Ruby 3.2+ or pin to diff-lcs ~> 1.5 if using older Ruby.
affects: >= 2.0.0
Upgrade
Version history
2.0.0latest on RubyGems
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
diff-lcs — gem install diff-lcs · libregistry