bootstripe 0.2.18 → 0.2.19

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,10 @@
1
1
  class Array
2
- def sum
3
- self.inject(:+)
2
+ def sum(identity = 0, &block)
3
+ if block_given?
4
+ map(&block).sum(identity)
5
+ else
6
+ inject(:+) || identity
7
+ end
4
8
  end
5
9
 
6
10
  def mean
@@ -1,3 +1,3 @@
1
1
  module Bootstripe
2
- VERSION = "0.2.18"
2
+ VERSION = "0.2.19"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstripe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.18
4
+ version: 0.2.19
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-18 00:00:00.000000000 Z
12
+ date: 2013-03-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec