mobj 2.6.1 → 2.6.2

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 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZjUxMTEwM2VlYmY3Nzg5ZmM1NTM2ZTE4NDA3NGNmNzllYzQzMTFmYg==
4
+ YmUyM2Y3NjY5YmNkMjliNWNjZWFjZWZiMzRkMGUyOWNkODk2NDA5NQ==
5
5
  data.tar.gz: !binary |-
6
- YzExY2ZmYmNlYmI3MGJjZjNjNzBmNWVhMjQyOTYwNzVmYThlYzEwMA==
6
+ MDdmNzUzN2UzMGI5ZjEyZjczYWY1MTMzMTY0ZjE3ZTExZjRiOTc1ZA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ODRkODEzNWQzMjkwOWYwNmFkNDM0OGM4MzAwYTgzMThhZWMzZjQ4ZTEwMDk0
10
- NDRiNjE0N2M0ZTc5NTIzNTg4ZWQxNTI5ODk0ZmNhN2IxYTZiMWIzZmU3M2Mz
11
- MTlhNTUzNjY2YWU4OGEyMmYxODdhYTgxYThlMTM5YmVkNzJjMWY=
9
+ ZTY4MjVlMmE1ZDc5OTMwMjdhZjFiZDEyNmNhNmJmMTZiMjQyM2FhYjBlZTZj
10
+ NzM5MjJjZjQ2MTNiMTdkZDVmOWI1MmIzYWEwZDU5ODJjYzI2Yzg0NmZhZWNi
11
+ NjE3YjljYjY0YjdjY2ZkZGQ1ODk2NWZiYzQ1NWJlMDAzODA1ODg=
12
12
  data.tar.gz: !binary |-
13
- Njc3YzdiZmJjNmJlMGZjY2FjY2I4ZjllYzdjNDMzODY4MTI4NDZjMTc1MDMw
14
- YTAyMjc0ZTlhYTBkMWQwNTljMTI1ZGMzYTRhNmJmMzI4YzM5ZjM5OTQwMGQ4
15
- NzM0ZmZkNDgzOGE1ZTZmMzlhOTljYjUzYmYxYTcxN2ZiYzNhMGY=
13
+ ZTk5ZGIyYWRiZGRkN2FiMDg0NWI2NDA0MmFmNmExNDg1YWU0ZDFhMWIwN2Fj
14
+ YWNiOWY0YWIwZjdjNTBjMTBlYjRkOWQ1MGI0OTY2NjAxYTQ0OWZmZjAxYTdh
15
+ ZGE0NjljYjAwZjc3MzRjNzNhNzNhOTM0YzExNjY5NDFmYjdjOWE=
data/lib/ext/array.rb CHANGED
@@ -22,6 +22,11 @@ module Mobj
22
22
  msum(&block) / size
23
23
  end
24
24
 
25
+ def mmid(&sorter)
26
+ sorted = sort(&sorter)
27
+ length.odd? ? sorted[length / 2] : (sorted[length/2 - 1] + sorted[length/2]).to_f / 2
28
+ end
29
+
25
30
  def values()
26
31
  self
27
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mobj
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.1
4
+ version: 2.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mason
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-11 00:00:00.000000000 Z
11
+ date: 2013-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec