diff --git a/lib/simplecov/coverage_data.rb b/lib/simplecov/coverage_data.rb index c2041dec..71c8c4c3 100644 --- a/lib/simplecov/coverage_data.rb +++ b/lib/simplecov/coverage_data.rb @@ -44,13 +44,13 @@ def initialize(covered:, missed:, total_strength: 0.0) def compute_percent(covered, total) return 100.0 if total.zero? - Float(covered * 100.0 / total) + covered * 100.0 / total end def compute_strength(total_strength, total) return 0.0 if total.zero? - Float(total_strength.to_f / total) + total_strength.to_f / total end end end