Project

General

Profile

Feature #13770

Can't create valid Cyrillic-named class/module

Added by sb (Sergey Borodanov) over 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
[ruby-core:82175]

Description

Can't create a valid Cyrillic-named class. If I have a file мир.rb:

# Content of мир.rb:

class Мир

  def приветствовать
    "Привет, Мир!"
  end

end

and do in bash:

ruby мир.rb

I get the error (SyntaxError):

мир.rb:1: class/module name must be CONSTANT

Same error with module creating and same behavior in irb (please, see attachment). At the same time Cyrillic-named constants and methods work fine.

It is expected that creating Cyrillic-named class/modules should work without error.


Files

Screenshot from 2017-07-26 19-08-14.png (64.2 KB) Screenshot from 2017-07-26 19-08-14.png Cyrillic-named class/module bug in irb sb (Sergey Borodanov), 07/26/2017 12:18 PM

Related issues

Related to Ruby master - Bug #11859: Regexp matching with \p{Upper} and \p{Lower} for EUC-JP doesn’t work.RejectedActions
Has duplicate Ruby master - Bug #15524: Unicode not Supported in Class NamesRejectedActions

Also available in: Atom PDF