1 comment

[ 3.9 ms ] story [ 12.5 ms ] thread
On the topic of case and unicode, it's also important to remember that, somewhat surprisingly, the number of characters can change when a change in case occurs:

  $ irb
  >> puts RUBY_VERSION
  2.6.5
  >> "ß".chars.size
  => 1
  >> "ß".upcase.chars.size
  => 2