diff options
author | Austin Ziegler <austin@zieglers.ca> | 2021-12-23 10:44:44 -0500 |
---|---|---|
committer | Austin Ziegler <austin@zieglers.ca> | 2022-07-04 20:26:10 -0400 |
commit | f85ec381137c6838600b16c353ff9dba3a05452c (patch) | |
tree | 7a2718961e97c56d4c70dc0a6ebe6b17aee005fc /lib/diff/lcs/internals.rb | |
parent | ef23b66e9a495206f2bf1cd9ce0df50d363d26ef (diff) | |
download | diff-lcs-f85ec381137c6838600b16c353ff9dba3a05452c.tar.gz |
standardrb --only Style/StringLiterals --fix
Diffstat (limited to 'lib/diff/lcs/internals.rb')
-rw-r--r-- | lib/diff/lcs/internals.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/diff/lcs/internals.rb b/lib/diff/lcs/internals.rb index ef77667..2ed713f 100644 --- a/lib/diff/lcs/internals.rb +++ b/lib/diff/lcs/internals.rb @@ -100,7 +100,7 @@ class << Diff::LCS::Internals # the object form of same) and detection of whether the patchset represents # changes to be made. def analyze_patchset(patchset, depth = 0) - fail 'Patchset too complex' if depth > 1 + fail "Patchset too complex" if depth > 1 has_changes = false new_patchset = [] @@ -157,22 +157,22 @@ class << Diff::LCS::Internals re = string ? src[change.new_position, 1] : src[change.new_position] case change.action - when '-' # Remove details from the old string + when "-" # Remove details from the old string if le == change.old_element left_match += 1 else left_miss += 1 end - when '+' + when "+" if re == change.new_element right_match += 1 else right_miss += 1 end - when '=' + when "=" left_miss += 1 if le != change.old_element right_miss += 1 if re != change.new_element - when '!' + when "!" if le == change.old_element left_match += 1 elsif re == change.new_element @@ -189,19 +189,19 @@ class << Diff::LCS::Internals element = string ? src[change.position, 1] : src[change.position] case change.action - when '-' + when "-" if element == change.element left_match += 1 else left_miss += 1 end - when '+' + when "+" if element == change.element right_match += 1 else right_miss += 1 end - when '=' + when "=" if element != change.element left_miss += 1 right_miss += 1 |