diff --git a/lib/statsample.rb b/lib/statsample.rb index ce5cc8b..1352a54 100644 --- a/lib/statsample.rb +++ b/lib/statsample.rb @@ -54,8 +54,10 @@ def include_aliasing(m, suffix = 'ruby') end class Array - def sum - inject(:+) + unless method_defined?(:sum) + def sum + inject(:+) + end end def mean