From 0b3a499ebb98e677f275aa1e42bbb18fecde70da Mon Sep 17 00:00:00 2001 From: Robin Daugherty Date: Wed, 4 Nov 2020 09:03:59 -0500 Subject: [PATCH] Fix incompatibility with simplecov < 0.18 --- lib/simplecov-lcov.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/simplecov-lcov.rb b/lib/simplecov-lcov.rb index b945c33..8c095a7 100644 --- a/lib/simplecov-lcov.rb +++ b/lib/simplecov-lcov.rb @@ -87,7 +87,7 @@ def format_file(file) pieces << "SF:#{filename}" pieces << format_lines(file) - if SimpleCov.branch_coverage? + if SimpleCov.respond_to?(:branch_coverage?) && SimpleCov.branch_coverage? branch_data = format_branches(file) pieces << branch_data if branch_data.length > 0 pieces << "BRF:#{file.total_branches.length}"