aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/numeric.rb
Commit message (Collapse)AuthorAgeFilesLines
* Deprecate "active_support/core_ext/numeric/inquiry"bogdanvlviv2018-03-021-1/+0
| | | | | | Numeric#positive? and Numeric#negative? was added to Ruby since 2.3, see https://github.com/ruby/ruby/blob/ruby_2_3/NEWS Rails 6 requires Ruby 2.4.1+ since https://github.com/rails/rails/pull/32034
* [Active Support] require_relative => requireAkira Matsuda2017-10-211-4/+4
| | | | This basically reverts 8da30ad6be34339124ba4cb4e36aea260dda12bc
* [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment`Koichi ITO2017-07-111-0/+1
|
* Use frozen-string-literal in ActiveSupportKir Shatrov2017-07-091-0/+1
|
* [Active Support] require => require_relativeAkira Matsuda2017-07-011-4/+4
|
* applies new string literal convention in activesupport/libXavier Noria2016-08-061-4/+4
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Move Integer#positive? and Integer#negative? query methods to Numeric classMehmet Emin İNAÇ2015-05-131-0/+1
| | | | By this way Integer, Rational, Float, Fixnum, Bignum classes have the same behaviour
* Squashed commit of the following:Aaron Patterson2013-05-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 2683de5da85135e8d9fe48593ff6167db9d64b18 Author: Aaron Patterson <aaron.patterson@gmail.com> Date: Fri May 3 11:29:20 2013 -0700 cannot support infinite ranges right now commit cebb6acef2c3957f975f6db4afd849e535126253 Author: Aaron Patterson <aaron.patterson@gmail.com> Date: Fri May 3 11:26:12 2013 -0700 reverting infinity comparison commit 385f7e6b4efd1bf9b89e8d607fcb13e5b03737ea Author: Aaron Patterson <aaron.patterson@gmail.com> Date: Fri May 3 11:23:28 2013 -0700 Revert "Added ability to compare date/time with infinity" This reverts commit 38f28dca3aa16efd6cc3af6453f2e6b9e9655ec1. Conflicts: activesupport/CHANGELOG.md activesupport/lib/active_support/core_ext/numeric/infinite_comparable.rb activesupport/test/core_ext/date_ext_test.rb activesupport/test/core_ext/date_time_ext_test.rb activesupport/test/core_ext/numeric_ext_test.rb activesupport/test/core_ext/time_ext_test.rb activesupport/test/core_ext/time_with_zone_test.rb commit 0d799a188dc12b18267fc8421675729917610047 Author: Aaron Patterson <aaron.patterson@gmail.com> Date: Fri May 3 11:18:53 2013 -0700 Revert "Refactor infinite comparable definition a bit" This reverts commit dd3360e05e4909f2f0c74a624cccc2def688f828. commit 42dec90e49745bbfae546f0560b8783f6b48b074 Author: Aaron Patterson <aaron.patterson@gmail.com> Date: Fri May 3 11:18:47 2013 -0700 Revert "Require 'active_support/core_ext/module/aliasing' in the infinite_comparable module" This reverts commit 7003e71c13c53ec3d34250560fbf80b8381df693.
* Added ability to compare date/time with infinitybUg2013-01-041-0/+1
| | | | | | | | | | | | | | | | | Date, DateTime, Time and TimeWithZone can now be compared to infinity, so it's now possible to create ranges with one infinite bound and date/time object as another bound. Ex.: @range = Range.new(Date.today, Float::INFINITY) Also it's possible to check inclusion of date/time in range with conversion. Ex.: @range.include?(Time.now + 1.year) # => true @range.include?(DateTime.now + 1.year) # => true Ability to create date/time ranges with infinite bound is required for handling postgresql range types.
* Moving NumberHelpers from ActionView to ActiveSupportAndrew Mutz2012-05-271-0/+1
|
* Convert Numeric bytes and time extension modules to class reopenJeremy Kemper2009-03-281-4/+2
|
* Convert Numeric extension module to a class reopenJeremy Kemper2009-03-211-1/+3
|
* * Introduce ActiveSupport.core_ext Integer, %w(conversions time etc)Jeremy Kemper2009-03-211-9/+2
| | | | | | * Convert some extension modules to simply reopening the class * Remove deprecated Float time extensions * Fold Base64 extension into ActiveSupport::Base64 since stdlib Base64 is gone
* Refactor number-to-HH:MM-string conversion logic from ↵Geoff Buesing2008-01-121-1/+3
| | | | | | TimeZone#formatted_offset to reusable Numeric#to_utc_offset_s method git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8635 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat, consistent load pathsJeremy Kemper2007-10-021-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Moved Active Support into its own gemDavid Heinemeier Hansson2005-02-151-0/+7
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@624 5ecf4fe2-1ee6-0310-87b1-e25e094e27de