facebook

Now there are 1,827 valid characters in Ruby 2.6

Now there are 1,827 valid characters in Ruby 2.6
Average rating: 0
(0 votes)

Thanks! You’ve rated this material!

Ladies and gentlemen, meet New Class Naming Rules in Ruby! Now in Ruby 2.6, non-ASCII uppercase characters are allowed. Instead of 26, now there are 1,827 valid characters in Ruby 2.6!

Getting back to Ruby 2.5 and prior, you must use a capital ASCII letter as the first character of a Class or Module name. There you had just: ABCDEFGHIJKLMNOPQRSTUVWXYZ.

The change supports uppercase characters in other languages but doesn’t go so far as to allow emoji as a Class or Module name. Because ‘this is the time to relax the limitation for Non-ASCII capital letters to start constant names’. With the addition of this feature, Rubyists in various languages can use their own alphabet for the first character of a Class or Module.

Read the full article here. What do you think about this update?

Rate this article, if you like it

Thanks! You’ve rated this material!

Got a project? Let's discuss it!

*By submitting this form you agree with our Privacy Policy.

Mailing & Legal Address

Syndicode Inc. 340 S Lemon Ave #3299, Walnut CA, 91789, USA

Visiting & Headquarters address
Kyiv Sofiivska 1/2a, 01001, Kyiv, Ukraine
Dnipro Hlinky 2, of. 1003, 49000, Dnipro, Ukraine
Email info@syndicode.com
Phone (+1) 9035021111