diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-06-21 07:00:28 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-06-21 07:00:28 +0000 |
commit | 6c8d354b8d9ca2fa62d0e062fa6346673dd15dbf (patch) | |
tree | 314efa0a4540a27b4218a4bdc3cf01e1b35dc537 /activesupport/lib/active_support/core_ext/fixnum.rb | |
parent | b69199c1da3ef89bdbebb98084bcf6fe31732a53 (diff) | |
download | rails-6c8d354b8d9ca2fa62d0e062fa6346673dd15dbf.tar.gz rails-6c8d354b8d9ca2fa62d0e062fa6346673dd15dbf.tar.bz2 rails-6c8d354b8d9ca2fa62d0e062fa6346673dd15dbf.zip |
Added Fix/Bignum#multiple_of? which returns true on 14.multiple_of?(7) and false on 16.multiple_of?(7) #1464 [Thomas Fuchs] Added even? and odd? to work with Bignums in addition to Fixnums #1464 [Thomas Fuchs]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1462 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib/active_support/core_ext/fixnum.rb')
-rw-r--r-- | activesupport/lib/active_support/core_ext/fixnum.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/fixnum.rb b/activesupport/lib/active_support/core_ext/fixnum.rb index fecef1da52..e983d5c0f9 100644 --- a/activesupport/lib/active_support/core_ext/fixnum.rb +++ b/activesupport/lib/active_support/core_ext/fixnum.rb @@ -3,3 +3,7 @@ require File.dirname(__FILE__) + '/fixnum/even_odd' class Fixnum #:nodoc: include ActiveSupport::CoreExtensions::Fixnum::EvenOdd end + +class Bignum #:nodoc: + include ActiveSupport::CoreExtensions::Fixnum::EvenOdd +end
\ No newline at end of file |