multiset 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +8 -8
  2. data/History.txt +7 -0
  3. data/lib/multiset.rb +8 -8
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OTM5ZWVlZGI1NzVhMmM4NDk2ZTRhNGJmOTg4YTVmNmY4M2NiZTExOA==
4
+ MDhmOWRlOWI0ZWUzY2NmZjc4NDQwOTE0MmFjYWVlNzFjOTVhNTJhMQ==
5
5
  data.tar.gz: !binary |-
6
- NmRmNGI0ZjEyYzYxNjQ1NzIzOTRhMWI1ZmE3ODdmMjAxNjA2OTkwNg==
6
+ ZTg5YzE1NmQzYTYzM2I5ODAxMmIzMDdiMDI0ODI0YWJjMDhhYzMwZg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NDlmYzA4M2RkNjNhZWExZDAwYzUwZjkyMGY5MWNjMzVlNzcwNjk2NGRhYTY0
10
- NTQ3Mjg4YzhhOTIxNTJmNDdiYTAwZmRmMzM2OTA2YjU2ZDcwNGYxNDkwYzA3
11
- YmUwNzZhMzFkMWM2ZTc0NWVjM2Q3MmM1YWExNTg2MGU1MGMzN2M=
9
+ MGRlZGU0MWNlNjljMDQ3ZGYwODVhMjdhN2Y5NzU3N2M2MTY4MTM5NTYxZjcw
10
+ Y2ZlM2VjMzQ1MmRlMjRjNzNiNmUyNjBiMjgxM2Q4NGNiYzYwMzk3MGQ0ZDBi
11
+ YzQxMjZkMWYxMGNmYzg5YmEyOWM1MGFlYTM0ZWJiOTY2NDk4ZDQ=
12
12
  data.tar.gz: !binary |-
13
- MmI2NmIyZWZjZmE2NDJhMWMwOWRkNzQzM2RjZDgxY2M3YzRmZGQ3MjZiZWIx
14
- YTE4NzVlMmQ1N2FlNjJjYjlhNDFhODgzMDJkMGUxMWQxMjY1MGVhNTdmODM0
15
- M2QwNmM2YTgwMThiZjllZmQ1NTdkYzExN2Y5NmY1NzYzZDRhM2Q=
13
+ NThjZDRhZTlhOWRmYzU3ZGE0NjI4NzM4MGMwZjAyOThmZjFlMzQxNGQ5MDAz
14
+ M2QyOGNlOTdkMzM2MGE0NGJhZWQwYjBmZDM2Y2UyMDg4MmI1ZmMxMDQ0Zjc2
15
+ YzVmMjllYzg2MDJhMzhmMTAwMDBkOTY0MzJhNTI1ODE3MjJlOTc=
@@ -223,3 +223,10 @@
223
223
  (en)
224
224
  * Multiset#sample returns nil in case the multiset is empty. (The same behavior as Array#sample.)
225
225
 
226
+ === 0.5.1 / 2014-08-10
227
+
228
+ (ja)
229
+ * いくつかのメソッドで、RDocのドキュメントに間違いがあったので修正。
230
+
231
+ (en)
232
+ * Fixed argument descriptions of some methods in the RDoc document.
@@ -3,7 +3,7 @@
3
3
 
4
4
  require "enumerator"
5
5
  require "multimap"
6
- VERSION = "0.5.0"
6
+ VERSION = "0.5.1"
7
7
 
8
8
  #==概要(Basic information)
9
9
  #
@@ -807,7 +807,7 @@ class Multiset
807
807
  # ブロックからの返り値をキーとして値を対応付けたMultimapを返します。
808
808
  #
809
809
  # Classify items in <code>self</code> by returned value from block.
810
- # Returns a Multimap whose values are associated with keys. Keys'
810
+ # Returns a Multimap whose values are associated with keys. Keys
811
811
  # are defined by returned value from given block.
812
812
  def group_by
813
813
  ret = Multimap.new
@@ -861,7 +861,7 @@ class Multiset
861
861
  # Multiset#findと同じですが、ブロックには<code>self</code>の要素とその個数の組が与えられます。
862
862
  #
863
863
  # The same as Multiset#find, but pairs of (non-duplicate) items and their counts are given to the block.
864
- def find_with(ifnone = nil, &block) # :yields: item
864
+ def find_with(ifnone = nil, &block) # :yields: item, count
865
865
  if block
866
866
  find_with_(ifnone, &block)
867
867
  else
@@ -906,7 +906,7 @@ class Multiset
906
906
  # Multiset#find_allと同じですが、ブロックには<code>self</code>の要素とその個数の組が与えられます。
907
907
  #
908
908
  # The same as Multiset#find_all, but pairs of (non-duplicate) items and their counts are given to the block.
909
- def find_all_with(&block) # :yields: item
909
+ def find_all_with(&block) # :yields: item, count
910
910
  if block
911
911
  find_all_with_(&block)
912
912
  else
@@ -922,7 +922,7 @@ class Multiset
922
922
  end
923
923
  ret
924
924
  end
925
- private :find_all_
925
+ private :find_all_with_
926
926
 
927
927
  # <code>pattern</code>の条件を満たした(<code>pattern</code> === item)要素のみを集めた多重集合を返します。
928
928
  # ブロックが与えられている場合は、さらにその結果を適用した結果を返します。
@@ -1043,7 +1043,7 @@ class Multiset
1043
1043
  # Multiset#max_by と同様ですが、ブロックには要素(重複なし)とその出現数の組が与えられます。
1044
1044
  #
1045
1045
  # Same as Multiset#min, but pairs of (non-duplicated) items and their counts are given to the block.
1046
- def max_by_with(&block) # :yields: item
1046
+ def max_by_with(&block) # :yields: item, count
1047
1047
  tmp = @entries.each_pair.max_by(&block)
1048
1048
  tmp ? tmp[0] : nil # if @entries is not empty, tmp must be a two-element array
1049
1049
  end
@@ -1051,7 +1051,7 @@ class Multiset
1051
1051
  # Multiset#min_by と同様ですが、ブロックには要素(重複なし)とその出現数の組が与えられます。
1052
1052
  #
1053
1053
  # Same as Multiset#max, but pairs of (non-duplicated) items and their counts are given to the block.
1054
- def min_by_with(&block) # :yields: item
1054
+ def min_by_with(&block) # :yields: item, count
1055
1055
  tmp = @entries.each_pair.min_by(&block)
1056
1056
  tmp ? tmp[0] : nil # if @entries is not empty, tmp must be a two-element array
1057
1057
  end
@@ -1059,7 +1059,7 @@ class Multiset
1059
1059
  # Multiset#minmax_by と同様ですが、ブロックには要素(重複なし)とその出現数の組が与えられます。
1060
1060
  #
1061
1061
  # Same as Multiset#minmax, but pairs of (non-duplicated) items and their counts are given to the block.
1062
- def minmax_by_with(&block) # :yields: item
1062
+ def minmax_by_with(&block) # :yields: item, count
1063
1063
  tmp = @entries.each_pair.minmax_by(&block)
1064
1064
  tmp[0] ? [tmp[0][0], tmp[1][0]] : nil
1065
1065
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multiset
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - H.Hiro(Maraigue)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-15 00:00:00.000000000 Z
11
+ date: 2014-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdoc