aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/inflector_test_cases.rb
diff options
context:
space:
mode:
authorJason <jasonmichaelroth@gmail.com>2011-05-07 13:21:00 -0600
committerJason <jasonmichaelroth@gmail.com>2011-05-07 13:21:00 -0600
commit3880ab0d7ca8d38c870279a1ad3495fba1c2995a (patch)
tree03e34adb1e3c33fb1640a9b802c0058c686396ee /activesupport/test/inflector_test_cases.rb
parent7ec3f33e3a5aa6d561ce34ae36c3beb495a0b6c7 (diff)
downloadrails-3880ab0d7ca8d38c870279a1ad3495fba1c2995a.tar.gz
rails-3880ab0d7ca8d38c870279a1ad3495fba1c2995a.tar.bz2
rails-3880ab0d7ca8d38c870279a1ad3495fba1c2995a.zip
ordinalize negative numbers patch
Applied patch by Amir Manji https://github.com/rails/rails/issues/437#issuecomment-1116045 Signed-off-by: Jason <jasonmichaelroth@gmail.com>
Diffstat (limited to 'activesupport/test/inflector_test_cases.rb')
-rw-r--r--activesupport/test/inflector_test_cases.rb30
1 files changed, 30 insertions, 0 deletions
diff --git a/activesupport/test/inflector_test_cases.rb b/activesupport/test/inflector_test_cases.rb
index 2b144e5931..ec9d92794c 100644
--- a/activesupport/test/inflector_test_cases.rb
+++ b/activesupport/test/inflector_test_cases.rb
@@ -215,6 +215,36 @@ module InflectorTestCases
}
OrdinalNumbers = {
+ "-1" => "-1st",
+ "-2" => "-2nd",
+ "-3" => "-3rd",
+ "-4" => "-4th",
+ "-5" => "-5th",
+ "-6" => "-6th",
+ "-7" => "-7th",
+ "-8" => "-8th",
+ "-9" => "-9th",
+ "-10" => "-10th",
+ "-11" => "-11th",
+ "-12" => "-12th",
+ "-13" => "-13th",
+ "-14" => "-14th",
+ "-20" => "-20th",
+ "-21" => "-21st",
+ "-22" => "-22nd",
+ "-23" => "-23rd",
+ "-24" => "-24th",
+ "-100" => "-100th",
+ "-101" => "-101st",
+ "-102" => "-102nd",
+ "-103" => "-103rd",
+ "-104" => "-104th",
+ "-110" => "-110th",
+ "-111" => "-111th",
+ "-112" => "-112th",
+ "-113" => "-113th",
+ "-1000" => "-1000th",
+ "-1001" => "-1001st",
"0" => "0th",
"1" => "1st",
"2" => "2nd",