vim-ruby/vim-ruby — pull request #163 by amarshall (2013-07-14 19:15:50+00:00)
Title: Highlight unicode characters in constants

#138 forgot about constants, and this remedies that mistake. Ruby doesn’t allow unicode characters as the first character of a constant (as shown by the below script), so we only highlight constants which have unicode characters as their second or later letter. I separately validated that all valid unicode characters are allowed (with a trivial modification of this script).

```ruby
unicode_codepoints = 0x80..0x10FFFF

valid_codepoints = unicode_codepoints.select.with_index do |codepoint, index|
str = [codepoint].pack 'U'
begin
eval "class #{str}; end"
rescue SyntaxError
false
else
true
end
end

valid_codepoints #=> []
```