From d5f230d730f444273bacdad1991daeefd70ad3f5 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Sat, 5 Aug 2023 18:09:28 -0700 Subject: [PATCH] simplify coding of sub compare_string_buffers --- lib/Perl/Tidy.pm | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/lib/Perl/Tidy.pm b/lib/Perl/Tidy.pm index 6403aa6e..2beab16d 100644 --- a/lib/Perl/Tidy.pm +++ b/lib/Perl/Tidy.pm @@ -2398,8 +2398,7 @@ EOM if ( $rOpts->{'assert-tidy'} ) { if ( $self->[_input_output_difference_] ) { my $diff_msg = - compare_string_buffers( $saved_input_buf, ${$routput_string}, - $is_encoded_data ); + compare_string_buffers( \$saved_input_buf, $routput_string ); $logger_object->warning(<getline(); - $lineo = $fho->getline(); + $linei = shift @aryi; + $lineo = shift @aryo; # compare chomp'ed lines if ( defined($linei) ) { $counti++; chomp $linei } -- 2.39.5