signed_multiset 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY.md +6 -2
- data/lib/signed_multiset/signed_multiset.rb +2 -2
- data/lib/signed_multiset/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c668c57c3959d0bfcb01c8100df51adc41b5608
|
4
|
+
data.tar.gz: 5058d5b5a8cfa2b2e39bd7e51ab7856617603fcd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f7b5820fcab890277e36e6159ce932a2814d7f6da029b94de16a317736b73e5673edd65eb177829cd2b4b7da94e4211cdc3210dc2142c9f39c440152f81eaf9
|
7
|
+
data.tar.gz: 3610e8eef2ece21ea1ab03a1de1ff2974d8065cad62e0a3449c1f61e22baa366a7d05ce8f1a93e9bbe7ad2e243a1ae339fff8296e8075718aab037f1f7f82b25
|
data/HISTORY.md
CHANGED
@@ -53,7 +53,7 @@ class SignedMultiset
|
|
53
53
|
# @return [Integer] The multiplicity for the key
|
54
54
|
def []=(key, multiplicity)
|
55
55
|
entries[key] = multiplicity
|
56
|
-
[key]
|
56
|
+
self[key]
|
57
57
|
end
|
58
58
|
|
59
59
|
# Increment the multiplicity for a key.
|
@@ -64,7 +64,7 @@ class SignedMultiset
|
|
64
64
|
def increment(key, value)
|
65
65
|
entries[key] ||= 0
|
66
66
|
entries[key] += value
|
67
|
-
[key]
|
67
|
+
self[key]
|
68
68
|
end
|
69
69
|
|
70
70
|
# Increment multiplicity by 1 for a key. This method is chainable.
|