From 0bf8d3e224dd62ccd58b3bea24c6f956861babd6 Mon Sep 17 00:00:00 2001 From: Jean-Michel Garnier Date: Fri, 24 Sep 2021 15:53:39 +0200 Subject: [PATCH] Make project compatible with Ruby >= 2.7 Fix: ArgumentError: wrong number of arguments (given 3, expected 2; required keywords: file_path, line_index) # reverse_coverage-0.1.1/lib/reverse_coverage/main.rb:80:in `save_changes' # reverse_coverage-0.1.1/lib/reverse_coverage/main.rb:35:in `block (2 levels) in add' --- lib/reverse_coverage/main.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/reverse_coverage/main.rb b/lib/reverse_coverage/main.rb index 1065b2d..38f136d 100644 --- a/lib/reverse_coverage/main.rb +++ b/lib/reverse_coverage/main.rb @@ -29,10 +29,8 @@ def add(example) lines.each_with_index do |changed, line_index| next if changed.nil? || changed.zero? - file_info = { file_path: file_path, line_index: line_index } - - save_changes(changes, example_data, file_info) - save_changes(coverage_matrix, example_data, file_info) + save_changes(changes, example_data, file_path: file_path, line_index: line_index) + save_changes(coverage_matrix, example_data, file_path: file_path, line_index: line_index) end end