Issue #14055 has been reported by rbjl (Jan Lelis).

----------------------------------------
Feature #14055: String#casecmp should use Unicode folding
https://bugs.ruby-lang.org/issues/14055

* Author: rbjl (Jan Lelis)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
The following string and symbol methods are currently only ASCII aware:

- String#casecmp
- String#casecmp!
- Symbol#casecmp
- Symbol#casecmp!

For example:

    "a".casecmp("A") #=> 0
    "".casecmp("") #=> 1

Now that Ruby has implemented case-folding (which is meant for comparing strings, see http://unicode.org/faq/casemap_charprop.html#2), it should be used when doing a casecmp on Unicode strings:

    "".downcase(:fold) == "" #=> true



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>