aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/core_ext/fixnum.rb3
-rw-r--r--activesupport/test/core_ext/fixnum_ext_test.rb7
2 files changed, 10 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/fixnum.rb b/activesupport/lib/active_support/core_ext/fixnum.rb
index e983d5c0f9..519408fb0d 100644
--- a/activesupport/lib/active_support/core_ext/fixnum.rb
+++ b/activesupport/lib/active_support/core_ext/fixnum.rb
@@ -1,9 +1,12 @@
require File.dirname(__FILE__) + '/fixnum/even_odd'
+require File.dirname(__FILE__) + '/fixnum/inflections'
class Fixnum #:nodoc:
include ActiveSupport::CoreExtensions::Fixnum::EvenOdd
+ include ActiveSupport::CoreExtensions::Fixnum::Inflections
end
class Bignum #:nodoc:
include ActiveSupport::CoreExtensions::Fixnum::EvenOdd
+ include ActiveSupport::CoreExtensions::Fixnum::Inflections
end \ No newline at end of file
diff --git a/activesupport/test/core_ext/fixnum_ext_test.rb b/activesupport/test/core_ext/fixnum_ext_test.rb
index 7ffc32a9e1..66297fc378 100644
--- a/activesupport/test/core_ext/fixnum_ext_test.rb
+++ b/activesupport/test/core_ext/fixnum_ext_test.rb
@@ -26,4 +26,11 @@ class FixnumExtTest < Test::Unit::TestCase
assert !22953686867719691230002707821868552601124472329079.multiple_of?(5)
assert !22953686867719691230002707821868552601124472329079.multiple_of?(7)
end
+
+ def test_ordinalize
+ # These tests are mostly just to ensure that the ordinalize method exists
+ # It's results are tested comprehensively in the inflector test cases.
+ assert_equal '1st', 1.ordinalize
+ assert_equal '8th', 8.ordinalize
+ end
end