mobj 2.6.0 → 2.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/ext/array.rb +5 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjUxMTEwM2VlYmY3Nzg5ZmM1NTM2ZTE4NDA3NGNmNzllYzQzMTFmYg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YzExY2ZmYmNlYmI3MGJjZjNjNzBmNWVhMjQyOTYwNzVmYThlYzEwMA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ODRkODEzNWQzMjkwOWYwNmFkNDM0OGM4MzAwYTgzMThhZWMzZjQ4ZTEwMDk0
|
10
|
+
NDRiNjE0N2M0ZTc5NTIzNTg4ZWQxNTI5ODk0ZmNhN2IxYTZiMWIzZmU3M2Mz
|
11
|
+
MTlhNTUzNjY2YWU4OGEyMmYxODdhYTgxYThlMTM5YmVkNzJjMWY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Njc3YzdiZmJjNmJlMGZjY2FjY2I4ZjllYzdjNDMzODY4MTI4NDZjMTc1MDMw
|
14
|
+
YTAyMjc0ZTlhYTBkMWQwNTljMTI1ZGMzYTRhNmJmMzI4YzM5ZjM5OTQwMGQ4
|
15
|
+
NzM0ZmZkNDgzOGE1ZTZmMzlhOTljYjUzYmYxYTcxN2ZiYzNhMGY=
|
data/lib/ext/array.rb
CHANGED
@@ -11,7 +11,11 @@ module Mobj
|
|
11
11
|
alias_method :notempty?, :unempty?
|
12
12
|
|
13
13
|
def msum(initial = 0.0, op = :+, &block)
|
14
|
-
|
14
|
+
if block
|
15
|
+
inject(initial) { |m, val| m.send(op, block[val]) }
|
16
|
+
else
|
17
|
+
map(&:to_f).inject(initial, op)
|
18
|
+
end
|
15
19
|
end
|
16
20
|
|
17
21
|
def mavg(&block)
|