Skip to content

Commit 3184da1

Browse files
author
Tom Lord
committed
Corrected config options example
1 parent c54b7a4 commit 3184da1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ When generating examples, the gem uses 2 configurable values to limit how many e
8585
To use an alternative value, simply pass the configuration option as follows:
8686

8787
```ruby
88-
/a*/.examples(max_repeater_variance: 5) #=> [''. 'a', 'aa', 'aaa', 'aaaa']
88+
/a*/.examples(max_repeater_variance: 5) #=> [''. 'a', 'aa', 'aaa', 'aaaa' 'aaaaa']
8989
/[F-X]/.examples(max_group_results: 10) #=> ['F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O']
9090
```
9191

9292
**_WARNING_**: Choosing huge numbers, along with a "complex" regex, could easily cause your system to freeze!
9393

94-
For example, if you try to generate a list of _all_ 5-letter words: `/\w{5}/.examples(max_group_results: 999)`, then - since there are actually `63` "word" characters (upper/lower case letters, numbers and "\_"), this will try to generate `63**5 #=> 992436543` (almost 1 trillion) examples!
94+
For example, if you try to generate a list of _all_ 5-letter words: `/\w{5}/.examples(max_group_results: 999)`, then since there are actually `63` "word" characters (upper/lower case letters, numbers and "\_"), this will try to generate `63**5 #=> 992436543` (almost 1 _trillion_) examples!
9595

9696
In other words, think twice before playing around with this config!
9797

0 commit comments

Comments
 (0)