Before Ruby 2.6, constant must have a capital ASCII letter as the first character. It means class and module name cannot start with non-ASCII capital character.
Below code will raise
class/module name must be CONSTANT exception.
We can use above non-ASCII character as a method name or variable name though.
Below code will run without any exception
“Имя” is treated as a variable name in above example, even though first letter(И) is a capital non-ASCII character.
Ruby 2.6 relaxes above mentioned limitation. We can now define constants in laguages other than English. Languages having capital letters like Russian and Greek can be used to define constant name.
Below code will run without exception in any Ruby 2.6.
As capital non-Ascii characters are now treated as constant, below code will raise a warning in Ruby 2.6.
Above code will run without any warnings on Ruby versions prior to 2.6