summaryrefslogtreecommitdiff
path: root/lib/diff/lcs.rb
diff options
context:
space:
mode:
authorAustin Ziegler <austin@zieglers.ca>2021-12-23 11:14:10 -0500
committerAustin Ziegler <austin@zieglers.ca>2022-07-04 20:26:10 -0400
commit99af1369a86b38585f6c63e9d50ac7040932916a (patch)
tree370f1bbc09632cd3a24c504815fa572e038b3e76 /lib/diff/lcs.rb
parent927b9b3c935f08a1611059e81b411c2ee2ff9724 (diff)
downloaddiff-lcs-99af1369a86b38585f6c63e9d50ac7040932916a.tar.gz
standardrb --only Style/ClassCheck --fix
Diffstat (limited to 'lib/diff/lcs.rb')
-rw-r--r--lib/diff/lcs.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/diff/lcs.rb b/lib/diff/lcs.rb
index 4461af0..2214240 100644
--- a/lib/diff/lcs.rb
+++ b/lib/diff/lcs.rb
@@ -144,7 +144,7 @@ class << Diff::LCS
def lcs(seq1, seq2, &block) # :yields: seq1[i] for each matched
matches = Diff::LCS::Internals.lcs(seq1, seq2)
ret = []
- string = seq1.kind_of? String
+ string = seq1.is_a? String
matches.each_index do |i|
next if matches[i].nil?
@@ -287,7 +287,7 @@ class << Diff::LCS
matches = Diff::LCS::Internals.lcs(seq1, seq2)
run_finished_a = run_finished_b = false
- string = seq1.kind_of?(String)
+ string = seq1.is_a?(String)
a_size = seq1.size
b_size = seq2.size
@@ -478,7 +478,7 @@ class << Diff::LCS
b_size = seq2.size
ai = bj = mb = 0
ma = -1
- string = seq1.kind_of?(String)
+ string = seq1.is_a?(String)
# Process all the lines in the match vector.
loop do
@@ -629,7 +629,7 @@ class << Diff::LCS
return src.respond_to?(:dup) ? src.dup : src unless has_changes
- string = src.kind_of?(String)
+ string = src.is_a?(String)
# Start with a new empty type of the source's class
res = src.class.new