From 2a9a662142d0e62337f4e8c92abca41ebf42cf59 Mon Sep 17 00:00:00 2001 From: Austin Ziegler Date: Sun, 28 Jun 2020 14:59:37 -0400 Subject: Fix some issues with 1.4 on older Rubies - Required to fully support rspec. - Resolves #63. --- lib/diff/lcs.rb | 2 +- lib/diff/lcs/hunk.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/diff/lcs.rb b/lib/diff/lcs.rb index 1fce946..9d47064 100644 --- a/lib/diff/lcs.rb +++ b/lib/diff/lcs.rb @@ -49,7 +49,7 @@ module Diff; end unless defined? Diff # rubocop:disable Style/Documentation # a x b y c z p d q # a b c a x b y c z module Diff::LCS - VERSION = '1.4.2' + VERSION = '1.4.3' end require 'diff/lcs/callbacks' diff --git a/lib/diff/lcs/hunk.rb b/lib/diff/lcs/hunk.rb index c6b3b25..d884a1b 100644 --- a/lib/diff/lcs/hunk.rb +++ b/lib/diff/lcs/hunk.rb @@ -20,7 +20,7 @@ class Diff::LCS::Hunk before = after = file_length_difference after += @blocks[0].diff_size @file_length_difference = after # The caller must get this manually - @max_diff_size = @blocks.lazy.map { |e| e.diff_size }.max + @max_diff_size = @blocks.map { |e| e.diff_size }.max # Save the start & end of each array. If the array doesn't exist (e.g., # we're only adding items in this block), then figure out the line -- cgit v1.2.1