diff options
author | Austin Ziegler <austin@zieglers.ca> | 2021-12-23 11:37:31 -0500 |
---|---|---|
committer | Austin Ziegler <austin@zieglers.ca> | 2022-07-04 20:26:10 -0400 |
commit | c00ef1d173c3663a3edd0adaee21cbcad7e1b3c3 (patch) | |
tree | 229028d6ef71639a559096a481f7692a99620fe0 | |
parent | e5e78807564a3565a37d385b0898cd58776820f4 (diff) | |
download | diff-lcs-c00ef1d173c3663a3edd0adaee21cbcad7e1b3c3.tar.gz |
standardrb --only Style/StringLiteralsInInterpolation
-rw-r--r-- | lib/diff/lcs/hunk.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/diff/lcs/hunk.rb b/lib/diff/lcs/hunk.rb index 8da65c2..2cef5ed 100644 --- a/lib/diff/lcs/hunk.rb +++ b/lib/diff/lcs/hunk.rb @@ -171,7 +171,9 @@ class Diff::LCS::Hunk # file -- don't take removed items into account. lo, hi, num_added, num_removed = @start_old, @end_old, 0, 0 + # standard:disable Performance/UnfreezeString outlist = @data_old[lo..hi].map { |e| String.new("#{encode(" ")}#{e.chomp}") } + # standard:enable Performance/UnfreezeString last_block = blocks[-1] @@ -225,7 +227,9 @@ class Diff::LCS::Hunk removes = @blocks.reject { |e| e.remove.empty? } unless removes.empty? + # standard:disable Performance/UnfreezeString outlist = @data_old[lo..hi].map { |e| String.new("#{encode(" ")}#{e.chomp}") } + # standard:enable Performance/UnfreezeString last_block = removes[-1] @@ -247,7 +251,9 @@ class Diff::LCS::Hunk inserts = @blocks.reject { |e| e.insert.empty? } unless inserts.empty? + # standard:disable Performance/UnfreezeString outlist = @data_new[lo..hi].map { |e| String.new("#{encode(" ")}#{e.chomp}") } + # standard:enable Performance/UnfreezeString last_block = inserts[-1] |