Skip to content

Commit

Permalink
standardrb --only Style/Alias --fix
Browse files Browse the repository at this point in the history
  • Loading branch information
halostatue committed Jul 5, 2022
1 parent 7d087cc commit b160187
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/diff/lcs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def traverse_balanced(other, callbacks = nil, &block)
def patch(patchset)
Diff::LCS.patch(self, patchset)
end
alias unpatch patch
alias_method :unpatch, :patch

# Attempts to patch +self+ with the provided +patchset+. A new sequence based
# on +self+ and the +patchset+ will be created. See Diff::LCS#patch. Does no
Expand Down Expand Up @@ -154,7 +154,7 @@ def lcs(seq1, seq2, &block) # :yields: seq1[i] for each matched
end
ret
end
alias LCS lcs
alias_method :LCS, :lcs

# #diff computes the smallest set of additions and deletions necessary to
# turn the first sequence into the second, and returns a description of these
Expand Down
4 changes: 2 additions & 2 deletions lib/diff/lcs/change.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def to_a
[@action, @position, @element]
end

alias to_ary to_a
alias_method :to_ary, :to_a

def self.from_a(arr)
arr = arr.flatten(1)
Expand Down Expand Up @@ -127,7 +127,7 @@ def to_a
]
end

alias to_ary to_a
alias_method :to_ary, :to_a

def self.from_a(arr)
Diff::LCS::Change.from_a(arr)
Expand Down
2 changes: 1 addition & 1 deletion lib/diff/lcs/hunk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def merge(hunk)
@start_new = hunk.start_new
blocks.unshift(*hunk.blocks)
end
alias unshift merge
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
Expand Down

0 comments on commit b160187

Please sign in to comment.