random_value_sampler 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/random_value_sampler.rb +1 -1
- metadata +2 -2
data/lib/random_value_sampler.rb
CHANGED
@@ -144,7 +144,7 @@ class RandomValueSampler
|
|
144
144
|
# this performs "sampling without replacement"
|
145
145
|
#-----------------------------------------------------------------------------
|
146
146
|
def sample_unique(n = 1)
|
147
|
-
raise "n must be 0 or greater to sample_unique" if n
|
147
|
+
raise "n must be 0 or greater to sample_unique" if n < 0
|
148
148
|
|
149
149
|
# take care of edge cases: where they ask for more samples than there are
|
150
150
|
# entries in the distribution (error)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: random_value_sampler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bmpercy
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-12-05 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|