aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/range.rb
Commit message (Collapse)AuthorAgeFilesLines
* Allow Range#=== and Range#cover? on Rangeutilum2018-05-221-1/+1
| | | | | | | | | | | ruby/ruby@989e07c features switching `Range#===` to use internal `r_cover_p` instead of rubyland `include?`. This breaks expected behavior of `ActiveSupport::CoreExt::Range` documented since at least 8b67a02. This patch adds overrides on `Range#cover?` and `Range#===` and places all three in a single module, `CompareWithRange`. *Requiring core_ext/range/include_range now causes a deprecation warnning*
* Allow `Range#include?` on TWZ rangesAndrew White2017-11-081-0/+1
| | | | | | | | | | | In #11474 we prevented TWZ ranges being iterated over which matched Ruby's handling of Time ranges and as a consequence `include?` stopped working with both Time ranges and TWZ ranges. However in ruby/ruby@b061634 support was added for `include?` to use `cover?` for 'linear' objects. Since we have no way of making Ruby consider TWZ instances as 'linear' we have to override `Range#include?`. Fixes #30799.
* [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.
* Disable ability to iterate over a Range of TimeWithZoneBogdan Gusiev2013-07-191-0/+1
|
* Remove blockless_step leave all that up to RubySantiago Pastorino2012-05-131-1/+0
| | | | Closes #6297
* Initial pass at removing dead 1.8.x code from Active Support.José Valim2011-12-201-1/+0
| | | | | | There are a bunch of other implicit branches that adds 1.8.x specific code that still needs to be removed. Pull requests for those cases are welcome.
* added Range#count? for Ruby 1.8Diego Carrion2011-02-191-0/+1
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Convert Range step and include extension modules to class reopenJeremy Kemper2009-03-291-3/+2
|
* Convert Range conversions extension module to class reopenJeremy Kemper2009-03-281-1/+2
|
* Convert Range extension module to a class reopenJeremy Kemper2009-03-211-1/+3
|
* * Introduce ActiveSupport.core_ext Integer, %w(conversions time etc)Jeremy Kemper2009-03-211-11/+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
* Style update for new Range extensionsJeremy Kemper2007-10-091-3/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7818 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* * Add Range#overlaps?(range), Range#include?(range), and Range#step without ↵Michael Koziarski2007-10-081-0/+6
| | | | | | a block. [brandon] Closes #9746 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7800 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat, consistent load pathsJeremy Kemper2007-10-021-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added to_s(:db) to RangeDavid Heinemeier Hansson2005-10-091-0/+5
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2506 5ecf4fe2-1ee6-0310-87b1-e25e094e27de