File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
lib/core_extensions/regexp Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -5,19 +5,21 @@ module Regexp
55 # No core classes are extended in any way, other than the above two methods.
66 module Examples
77 def examples ( **config_options )
8- RegexpExamples ::ResultCountLimiters . configure! (
8+ RegexpExamples ::ResultCountLimiters . with_configuration (
99 max_repeater_variance : config_options [ :max_repeater_variance ] ,
1010 max_group_results : config_options [ :max_group_results ] ,
1111 max_results_limit : config_options [ :max_results_limit ]
12- )
13- examples_by_method ( :result )
12+ ) do
13+ examples_by_method ( :result )
14+ end
1415 end
1516
1617 def random_example ( **config_options )
17- RegexpExamples ::ResultCountLimiters . configure! (
18+ RegexpExamples ::ResultCountLimiters . with_configuration (
1819 max_repeater_variance : config_options [ :max_repeater_variance ]
19- )
20- examples_by_method ( :random_result ) . sample ( 1 ) . first
20+ ) do
21+ examples_by_method ( :random_result ) . sample
22+ end
2123 end
2224
2325 private
You can’t perform that action at this time.
0 commit comments