Skip to content

Commit

Permalink
Simplify #sum
Browse files Browse the repository at this point in the history
  • Loading branch information
justincampbell committed Apr 17, 2012
1 parent 926c412 commit 92eebd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/easystats.rb
Expand Up @@ -48,7 +48,7 @@ def standard_deviation
end unless method_defined? :standard_deviation

def sum
self.reduce { |total, number| total + number }
self.reduce :+
end unless method_defined? :sum

def variance
Expand Down

0 comments on commit 92eebd7

Please sign in to comment.