Skip to content

Use `regexp_property_values` gem for accurate property mapping

Latest
Compare
Choose a tag to compare
@tom-lord tom-lord released this 20 May 18:53

See: #40

Replace usage of the unicode ranges pstore (which had not been updated for unicode 13.0 --> 15.1+!), with the regexp_property_values gem.

This fixes/improves various examples generation for named properties, including:

# Previously no list was stored, because data was outdated, so no examples could be generated:
/\p{Age=15.0}/.random_example #=> "䧖"

# Previously no list was stored, because the generator as flawed, so no examples could be generated:
/\p{In Miscellaneous Mathematical Symbols-B}/.random_example #=> "⦉"

# Previously the gem didn't handle space/hyphen padded property names, and only generated up to 128 examples:
/\p{Lowercase-Letter}/.examples(max_group_results:99999).count
=> 2155