From 55efe367bf8e3745749114bb013f412c7b379c49 Mon Sep 17 00:00:00 2001 From: Christophe Robillard Date: Wed, 16 Jun 2021 13:20:06 +0200 Subject: [PATCH] percentile returns always an integer --- lib/core_ext/array.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core_ext/array.rb b/lib/core_ext/array.rb index 00aa9f59c..39d7ad777 100644 --- a/lib/core_ext/array.rb +++ b/lib/core_ext/array.rb @@ -17,7 +17,7 @@ class Array values = self.sort if values.empty? - return [] + return 0 elsif values.size == 1 return values.first elsif p == 100