aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext
Commit message (Collapse)AuthorAgeFilesLines
* Added Kernel#silence_stderr to silence stderr for the duration of the given ↵Sam Stephenson2005-11-071-0/+10
| | | | | | block. Changed Kernel#` to print a message to stderr (like Unix) instead of raising Errno::ENOENT on Win32. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2899 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Changed 0.blank? to false rather than true since it violates everyone's ↵Jeremy Kemper2005-11-021-0/+13
| | | | | | expectation of blankness. Closes #2518, Closes #2705. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2849 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added petabytes and exebytes to numeric extensions (closes #2397) ↵David Heinemeier Hansson2005-10-261-1/+3
| | | | | | [timct@mac.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2746 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Time#end_of_month to accompany Time#beginning_of_month (closes #2514) ↵David Heinemeier Hansson2005-10-261-0/+7
| | | | | | [Jens-Christian Fischer] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2745 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove generated code from app traces; improve accuracy of framework tracesNicholas Seckar2005-10-181-0/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2676 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Update Exception extension to show the first few framework frames in an ↵Nicholas Seckar2005-10-161-0/+14
| | | | | | application trace. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2654 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add unit tests for exception extensionsNicholas Seckar2005-10-161-0/+24
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2646 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Enumerable#first_matchNicholas Seckar2005-10-141-0/+15
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2578 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that Time#change should also reset usec when also resetting minutes ↵David Heinemeier Hansson2005-10-131-0/+5
| | | | | | #2459 [ikeda@dream.big.or.jp] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2568 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added to_s(:db) to RangeDavid Heinemeier Hansson2005-10-091-0/+16
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2506 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add :rfc822 as an option for Time#to_s (to get rfc822-formatted times)Jamis Buck2005-10-031-3/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2445 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed memory leak with Active Record classes when Dependencies.mechanism = ↵David Heinemeier Hansson2005-09-201-46/+0
| | | | | | :load #1704 [c.r.mcgrath@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2276 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Hash#reverse_merge, Hash#reverse_merge!, and Hash#reverse_update to ↵David Heinemeier Hansson2005-09-112-1/+13
| | | | | | ease the use of default options. Added :connector and :skip_last_comma options to Array#to_sentence git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2192 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Array#to_sentence that'll turn ['one', 'two', 'three'] into 'one, two, ↵David Heinemeier Hansson2005-09-111-0/+14
| | | | | | and three' #2157 [m.stienstra@fngtps.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2185 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added test to ensure that silence_warnings also returned its valueDavid Heinemeier Hansson2005-09-111-0/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2180 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Kernel#silence_warnings and puts it into use throughout the frameworkDavid Heinemeier Hansson2005-09-112-1/+21
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2179 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added String#starts_with? and String#ends_with? #2118 [thijs@vandervossen.net]David Heinemeier Hansson2005-09-091-0/+11
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2171 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make assert_valid_keys slightly more lenientDavid Heinemeier Hansson2005-09-091-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2166 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added String#at, String#from, String#to, String#first, String#last in ↵David Heinemeier Hansson2005-09-031-0/+14
| | | | | | ActiveSupport::CoreExtensions::String::Access to ease access to individual characters and substrings in a string serving basically as human names for range access. Added easy extendability to the inflector through Inflector.inflections (using the Inflector::Inflections singleton class) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2110 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make Time#last_month work when invoked on the 31st of a month.Jamis Buck2005-08-311-0/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2083 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add Time.days_in_month, and make Time#next_month work when invoked on the ↵Jamis Buck2005-08-311-0/+24
| | | | | | 31st of a month git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2082 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that Time#midnight would have a non-zero usec on some platforms #1836Jamis Buck2005-07-311-1/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1959 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Factor Fixnum and Bignum extensions into Integer classNicholas Seckar2005-07-191-4/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1863 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add ordinalize to Fixnum and Bignum instancesNicholas Seckar2005-07-181-0/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1855 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added more efficient implementation of the development mode reset of classes ↵David Heinemeier Hansson2005-07-071-1/+29
| | | | | | #1638 [Chris McGrath] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1761 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed memory leak with Object#remove_subclasses_of, which inflicted a Rails ↵David Heinemeier Hansson2005-06-301-0/+18
| | | | | | application running in development mode with a ~20KB leak per request #1289 [c.r.mcgrath@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1569 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Increased accuracy of 1.year by accounting for leap years. The time ↵Jeremy Kemper2005-06-241-1/+1
| | | | | | extensions are not meant to be super-precise but this seems worth it since otherwise you lose a lot of days doing 40.years.ago. Closes #1488 [tuxie@dekadance.se] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1499 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improved performance of Routes generation by a factor of 5 #1434 [Nicholas ↵David Heinemeier Hansson2005-06-242-0/+29
| | | | | | Seckar] Added named routes (NEEDS BETTER DESCRIPTION) #1434 [Nicholas Seckar] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1496 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Fix/Bignum#multiple_of? which returns true on 14.multiple_of?(7) and ↵David Heinemeier Hansson2005-06-211-0/+15
| | | | | | 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
* Fixed Time#at_beginning_of_week returned the next Monday instead of the ↵David Heinemeier Hansson2005-06-161-0/+7
| | | | | | previous one when called on a Sunday #1403 [jean.helou@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1431 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that HashWithIndifferentAccess stringified all keys including symbols, ↵David Heinemeier Hansson2005-05-191-0/+6
| | | | | | ints, objects, and arrays #1162 [Nicholas Seckar] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1329 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed Time#last_year to go back in time, not forward #1278 [fabien@odilat.com]David Heinemeier Hansson2005-05-191-0/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1319 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that Time.local(2005,12).months_since(1) would raise "ArgumentError: ↵David Heinemeier Hansson2005-05-191-0/+2
| | | | | | argument out of range" #1311 [jhahn@niveon.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1308 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Fixnum#even? and Fixnum#odd?David Heinemeier Hansson2005-04-051-0/+14
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1094 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improved error reporting especially around never shallowing exceptions. ↵David Heinemeier Hansson2005-03-231-0/+17
| | | | | | Debugging helpers should be much easier now #980 [Nicholas Seckar] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@985 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improved error reporting especially around never shallowing exceptions. ↵David Heinemeier Hansson2005-03-231-0/+12
| | | | | | Debugging helpers should be much easier now #980 [Nicholas Seckar] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@984 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed tests for indifferent accessDavid Heinemeier Hansson2005-03-071-47/+16
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@873 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed Hash#indifferent_access to also deal with include? and fetch and ↵David Heinemeier Hansson2005-03-071-0/+61
| | | | | | nested hashes #726 [Nicholas Seckar] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@872 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed an exception when using Ajax based requests from Safari because Safari ↵David Heinemeier Hansson2005-03-031-6/+20
| | | | | | appends a \000 to the post body. Symbols can't have \000 in them so indifferent access would throw an exception in the constructor. Indifferent hashes now use strings internally instead. #746 [Tobias Luetke] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@827 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added String#to_time and String#to_date for wrapping ParseDateDavid Heinemeier Hansson2005-03-021-0/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@824 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added year-based time calculationsDavid Heinemeier Hansson2005-02-241-0/+17
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@779 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Date::Conversions for getting dates in different convenient string ↵David Heinemeier Hansson2005-02-212-1/+18
| | | | | | representations and other objects git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@738 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Time::Conversions for getting times in different convenient string ↵David Heinemeier Hansson2005-02-211-0/+14
| | | | | | representations and other objects git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@737 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added next_week and made beginning_of_week be a Monday, not a SundayDavid Heinemeier Hansson2005-02-211-1/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@733 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Treat UTC times nicerDavid Heinemeier Hansson2005-02-211-13/+12
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@732 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Time::Calculations to ask for things like Time.now.tomorrow, ↵David Heinemeier Hansson2005-02-211-0/+84
| | | | | | Time.now.yesterday, Time.now.months_ago(4) #580 [DP|Flurin] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@731 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Moved Active Support into its own gemDavid Heinemeier Hansson2005-02-154-16/+16
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@624 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Hash#stringify_keys and Hash#stringify_keys!David Heinemeier Hansson2005-02-121-0/+14
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@586 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added IndifferentAccess as a way to wrap a hash by a symbol-based store that ↵David Heinemeier Hansson2005-02-111-1/+11
| | | | | | also can be accessed by string keys git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@581 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added methods for removing subclasses -- couldnt make it work with the ↵David Heinemeier Hansson2005-01-251-0/+21
| | | | | | regular nested-module approach (ObjectSpace was being difficult), so this is a straight inclusion git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@506 5ecf4fe2-1ee6-0310-87b1-e25e094e27de