mobj 2.6.0 → 2.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +8 -8
  2. data/lib/ext/array.rb +5 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MWJmMjVjMjVmZDI0MmQ0ZjkyODBhZjY3ZmYwMWU3MWQyMjkxMDdlZQ==
4
+ ZjUxMTEwM2VlYmY3Nzg5ZmM1NTM2ZTE4NDA3NGNmNzllYzQzMTFmYg==
5
5
  data.tar.gz: !binary |-
6
- NDM2M2FjMmQ4MzY3NjI0OTRlZDc0YTVjNjNlMmUwZDliZGYzYjgyMQ==
6
+ YzExY2ZmYmNlYmI3MGJjZjNjNzBmNWVhMjQyOTYwNzVmYThlYzEwMA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZGYzOGE5NDFkOGU0YTJhNDNiN2M1MTM2MTE1MjllM2FhZmY4NzdiNzNkODY2
10
- N2RiOGQwMTFkMjQ3YzU0N2U4ZTU1MDM2YmJkODljYmYyNjZkODU3MGRmYzY4
11
- NTc1ZjM0MTljNTIwNzkwMmRjYzMyMTRkNTViMzk3YjJjMmI4MjA=
9
+ ODRkODEzNWQzMjkwOWYwNmFkNDM0OGM4MzAwYTgzMThhZWMzZjQ4ZTEwMDk0
10
+ NDRiNjE0N2M0ZTc5NTIzNTg4ZWQxNTI5ODk0ZmNhN2IxYTZiMWIzZmU3M2Mz
11
+ MTlhNTUzNjY2YWU4OGEyMmYxODdhYTgxYThlMTM5YmVkNzJjMWY=
12
12
  data.tar.gz: !binary |-
13
- ZjZmNTk3ZGJlMmY3OWJiMjJmOTRhYWM2NGMxNjljODBhMzMxNDBmNzUwOWQ5
14
- NDdmMWVjMzBkZmQyZWQ1YjkyNDc1N2MzY2VkMjY2NzU2OTJlNjBlN2JhY2Jk
15
- OTIzOWYyYjJhZDc2YzkzZjliOGNiMGQzOThlMWM4YTQ3MGVjMWM=
13
+ Njc3YzdiZmJjNmJlMGZjY2FjY2I4ZjllYzdjNDMzODY4MTI4NDZjMTc1MDMw
14
+ YTAyMjc0ZTlhYTBkMWQwNTljMTI1ZGMzYTRhNmJmMzI4YzM5ZjM5OTQwMGQ4
15
+ NzM0ZmZkNDgzOGE1ZTZmMzlhOTljYjUzYmYxYTcxN2ZiYzNhMGY=
@@ -11,7 +11,11 @@ module Mobj
11
11
  alias_method :notempty?, :unempty?
12
12
 
13
13
  def msum(initial = 0.0, op = :+, &block)
14
- map(&:to_f).inject(initial, block ? block : op)
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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mobj
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0
4
+ version: 2.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mason