rails/rails — pull request #14247 by robin850 (2014-03-02 19:04:38+00:00)
Title: Make the apply_inflections method case-sensitive

Hello,

Since d3071db1, the apply_inflections method check if the downcased version of a string is contained inside the "whitelist" of uncountable words. However, if the word is composed of capital letters, it won't be
matched in the list while it should.

We can't simply revert to the previous behavior as there is a performance concern (benchmarked over `/usr/share/dict/words`):

| | user | system | total | real |
|-----------------|------------|-----------|------------|--------------|
| Before d3071db1 | 135.610000 | 0.290000 | 135.900000 | (137.807081) |
| Since d3071db1 | 22.170000 | 0.020000 | 22.190000 | ( 22.530005) |
| With the patch | 25.130000 | 0.070000 | 25.200000 | ( 25.611538) |

Benchmarked with http://git.io/aFnWig.

Have a nice day.