Array#third, and so on. Some people are concerned about code bloat, some are concerned about lack of elegance, and DHH's judgment in writing this bit of code has been seriously challenged.
Well, I'm not happy either - because the changes don't go far enough. Let's add one more method to
Arrayand be done with it:
self[pos.to_i - 1]
With this simple addition, you can refer to
Array.by_ordinal("21st"), or even
Array.by_ordinal("407th"). As a bonus, the naming of the individual members is consistent with Rails'
Inflector#ordinalizemethod. Please join me in pushing for this to be included in Rails core.