- 💎 Full ruby
v2.6.3support. (There were a few minor bugs introduced by the unicode version bump from
- ⬇️ Dropped support for ruby
- Fixed ability to generate examples for patterns like:
/ __xxx__ /.
- ➕ Added support for unicode range generation, e.g.
- 💎 Full ruby
💎 Generated unicode 11.0 ranges, as required for ruby
🚀 This release contains a significant fix to
Regexp#random_example, as reported here: #21
🛠 There are also some minor additions/bug fixes
- ➕ Added (limited) support for the absence operator.
- 🛠 Fixed back-reference group counter when using non-capture groups or comment groups. (This impacts regex example generation when the back-reference number is after one of the aforementioned group types.)
💎 Generated unicode 10.0 ranges, as required for ruby
This ensures code such as:
💎 will generate a matching example under the new ruby version.
//.examples # => [''] //.random_example # => ''
In previous versions of the gem, running the above commands failed.
🔧 Configuration options can now be made globally, e.g.
RegexpExamples::Config.max_repeater_variance = 5 RegexpExamples::Config.max_group_results = 10 RegexpExamples::Config.max_results_limit = 20000
Or within a block, e.g.
RegexpExamples::Config.with_configuration(max_repeater_variance: 5) do # ... end
All forms of configuration are now thread safe.
🚀 This release comes with two significant fixes:
/[[:punct:]]/.examplescan now return all possible characters for ruby 2.4.0+. (The definition of this character set has changed in the latest minor ruby version.)
/foo\Z/.exampleswill now return "foo" and "foo\n". This fixes a long-standing bug in the library.