Skip to content

Instantly share code, notes, and snippets.

@jaynetics
Created June 14, 2023 19:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaynetics/bb97887b6dc33c64cbc354f4de6c63ba to your computer and use it in GitHub Desktop.
Save jaynetics/bb97887b6dc33c64cbc354f4de6c63ba to your computer and use it in GitHub Desktop.
Show when each regexp unicode property was added to Ruby
require 'regexp_parser'
map = Regexp::Syntax.specified_versions.to_h do |ver|
[ver, Regexp::Syntax.const_get(ver).added_features[:property].to_a]
end
Regexp::Syntax::CURRENT.features[:property].to_h do |prop|
[prop, map.keys.find { |v| map[v]additions.include?(prop) }]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment