Created
June 14, 2023 19:15
-
-
Save jaynetics/bb97887b6dc33c64cbc354f4de6c63ba to your computer and use it in GitHub Desktop.
Show when each regexp unicode property was added to Ruby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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