Permalink
Browse files

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.
  • Loading branch information...
1 parent 14735fc commit 554fc733222a33abf7e5e919a9c293ff77d38aa8 @halostatue committed Feb 9, 2013
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/diff/lcs/hunk.rb
View
@@ -81,6 +81,7 @@ def merge(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

0 comments on commit 554fc73

Please sign in to comment.