Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix syntax error in example #21

Merged
merged 2 commits into from
Feb 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down