Bug #4549
closedCan't start class names with non us-ascii chars
Description
=begin
irb(main):003:0> #encoding: UTF-8
irb(main):004:0* class Åäö; end
SyntaxError: (irb):4: class/module name must be CONSTANT
class Åäö; end
^
from /usr/local/bin/irb:12:in `'
=end
Updated by carl.hoerberg (Carl Hörberg) over 13 years ago
=begin
irb(main):003:0> #encoding: UTF-8
irb(main):004:0* class Åäö; end
SyntaxError: (irb):4: class/module name must be CONSTANT
class Åäö; end
^
from /usr/local/bin/irb:12:in `'
=end
Updated by naruse (Yui NARUSE) over 13 years ago
- Status changed from Open to Rejected
=begin
It is because Å is not a uppercase letter.
=end
Updated by carl.hoerberg (Carl Hörberg) over 13 years ago
=begin
I beg the differ! ÅÄÖ are all uppercase letters, as oppose to åäö, in the Swedish alphabet.
The problem this is occurring for us is that we can't the name the objects in your domain model correctly. We don't wan't to translate it to English because we want to communicate with our customers using their terms and not constantly have to translate back and forth..
=end
Updated by naruse (Yui NARUSE) over 13 years ago
=begin
Use decomposed string. In this case,
class A\u030Aa\u0308o\u0308
end
Ruby considers it is begin with ASCII uppercased character: constant.
=end