diff options
author | Austin Ziegler <austin@zieglers.ca> | 2013-02-09 10:25:21 -0500 |
---|---|---|
committer | Austin Ziegler <austin@zieglers.ca> | 2013-02-09 10:25:21 -0500 |
commit | 554fc733222a33abf7e5e919a9c293ff77d38aa8 (patch) | |
tree | aba8cb50b651c95b4dd58200372fd9f3fde65e3f /lib | |
parent | 14735fc4238e73c4323564d889b81a1f4c0fdee2 (diff) | |
download | diff-lcs-554fc733222a33abf7e5e919a9c293ff77d38aa8.tar.gz |
Restoring an older public API method.
- I changed what I thought was a private API, but it turns out that
people used Hunk#unshift. Because the Hunk#merge functionality is
safer and more correct, I have provided Hunk#unshift as an alias to
Hunk#merge.
- Note that Hunk#unshift should be considered deprecated and the alias
will be removed in a future major version of Diff::LCS.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/diff/lcs/hunk.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/diff/lcs/hunk.rb b/lib/diff/lcs/hunk.rb index ed0d75d..13e3622 100644 --- a/lib/diff/lcs/hunk.rb +++ b/lib/diff/lcs/hunk.rb @@ -81,6 +81,7 @@ class Diff::LCS::Hunk nil end end + alias_method :unshift, :merge # Determines whether there is an overlap between this hunk and the # provided hunk. This will be true if the difference between the two hunks |