From 4b7f9909d6c303556b4883ba1d447ac6b15df2f9 Mon Sep 17 00:00:00 2001 From: Austin Ziegler Date: Thu, 23 Dec 2021 11:37:31 -0500 Subject: standardrb --only Style/StringLiteralsInInterpolation --- lib/diff/lcs/hunk.rb | 6 ++++++ 1 file changed, 6 insertions(+) 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] -- cgit v1.2.1