From 001da691237f74bb982b0cee0fa9eaa2c3571016 Mon Sep 17 00:00:00 2001 From: Harlan T Wood Date: Sat, 20 Jan 2024 23:06:52 -1000 Subject: [PATCH 1/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aa49bda..d733c4f 100644 --- a/README.md +++ b/README.md @@ -250,7 +250,7 @@ Always returns the given value. No shrinking. Allows you to take the result of one generator and transform it into something else. - >> G.choose(32..128).map(&:chr).sample(1, size: 10, Random.new(42)) + >> G.choose(32..128).map(&:chr).sample(1, size: 10, rng: Random.new(42)) => ["S"] #### Generator#bind From 5b3cbb98add86273b2394a9af0c97aaeeeafecd8 Mon Sep 17 00:00:00 2001 From: Harlan T Wood Date: Sat, 20 Jan 2024 23:14:47 -1000 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d733c4f..06ab7a6 100644 --- a/README.md +++ b/README.md @@ -262,7 +262,7 @@ Allows you to create one or another generator conditionally on the output of ano This is an advanced feature. Often, you can use a combination of `Generators.tuple` and `Generator#map` instead: - >> G.tuple(integer, integer).sample(1, size: 100, rng: Random.new(42) + >> G.tuple(G.integer, G.integer).sample(1, size: 100, rng: Random.new(42)) => [[2, 79]] #### Generators.one_of