aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext
Commit message (Collapse)AuthorAgeFilesLines
* Make to_query safe against nilsDavid Heinemeier Hansson2007-01-241-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6039 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Hash#to_query to turn a hash of values into a form-encoded query ↵David Heinemeier Hansson2007-01-241-0/+24
| | | | | | string [Nicholas Seckar] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6038 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Increase test coverage for subclasses_of. Closes #7335.Nicholas Seckar2007-01-241-5/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6036 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Better docs for Object extensions (closes #7002)Jamis Buck2007-01-221-1/+21
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6011 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix that Dates couldn't be subtracted from Dates after [5940].Sam Stephenson2007-01-151-1/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5954 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add Object#acts_like? and Time#acts_like_time? and Date#acts_like_date? to ↵Jamis Buck2007-01-156-0/+44
| | | | | | facilitate duck-typing git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5951 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make 1.months and friends accurate by introducing a Duration class. #6835 ↵Michael Koziarski2007-01-154-11/+94
| | | | | | [eventualbuddha] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5940 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Document Inflector.ordinalize and merge docs from String inflections. Closes ↵Jeremy Kemper2007-01-142-5/+11
| | | | | | #7023. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5924 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* False is a reasonable defaultDavid Heinemeier Hansson2006-12-271-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5793 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Hash#slice(*keys) returns a new hash with only the given keys. #slice! ↵Jeremy Kemper2006-12-172-5/+32
| | | | | | replaces the hash with only the given keys. Works with HashWithIndifferentAccess also. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5726 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* HashWithIndifferentAccess#to_hash converts to a Hash with String keys and ↵Jeremy Kemper2006-12-162-3/+8
| | | | | | the same default value. Fix Hash#reverse_update to be an alias for reverse_merge./script/console More thoroughly test the reverse_* methods. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5725 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed Array#to_xml when it contains a series of hashes (each piece would get ↵David Heinemeier Hansson2006-12-031-2/+2
| | | | | | its own XML declaration) (closes #6610) [thkarcher/cyu] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5668 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Time#to_s(:time) which will just return H:M, like 17:44 [DHH]David Heinemeier Hansson2006-11-251-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5628 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Grep slightly faster than select =~Jeremy Kemper2006-11-171-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5546 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add Module#attr_accessor_with_default to initialize value of attribute ↵Marcel Molina2006-11-162-0/+32
| | | | | | before setting it. Closes #6538. [Stuart Halloway, Marcel Molina Jr.] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5539 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix end of dayDavid Heinemeier Hansson2006-11-141-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5523 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Hash#to_xml handles keys with the same name as Kernel methods. Closes #6613.Jeremy Kemper2006-11-141-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5521 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Time#end_of_day to get 23:59:59 of that day [DHH]David Heinemeier Hansson2006-11-121-0/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5495 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* next_week respects DST changes. Closes #5617, closes #2353, closes #2509, ↵Jeremy Kemper2006-11-021-6/+7
| | | | | | references #4551. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5388 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* next_week respects DST changes. Closes #6483.Jeremy Kemper2006-10-241-1/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5363 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Expose methods added to Enumerable in the documentation, such as group_by. ↵Marcel Molina2006-10-221-2/+2
| | | | | | Closes #6170. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5334 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* make sure the String::Access methods return strings, and not multibyte Char ↵Jamis Buck2006-10-131-5/+5
| | | | | | instances git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5299 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make core_ext/string/access.rb multibyte safe. Closes #6388 [Manfred Stienstra]Michael Koziarski2006-10-121-5/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5287 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add ActiveSupport::Multibyte. Provides String#chars which lets you deal ↵Michael Koziarski2006-10-032-0/+44
| | | | | | with strings as a sequence of chars, not of bytes. Closes #6242 [Julian Tarkhanov, Manfred Stienstra & Jan Behrens] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5223 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix issue with #class_inheritable_accessor saving updates to the parent ↵Rick Olson2006-10-021-1/+6
| | | | | | class when initialized with an Array or Hash [mojombo] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5218 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Hash#to_xml supports Bignum and BigDecimal. Closes #6313.Jeremy Kemper2006-09-291-8/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5209 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Hash.create_from_xml has been renamed to Hash.from_xml, alias will exist ↵David Heinemeier Hansson2006-09-201-2/+7
| | | | | | until Rails 2.0 [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5149 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* alias_method_chain yields method target and punctuation to simplify wrapper ↵Jeremy Kemper2006-09-151-0/+1
| | | | | | method definition. Used by the deprecate module method. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5113 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* alias_method_chain works with accessor= methods also. Closes #6153.Jeremy Kemper2006-09-121-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5091 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't pad remaining places with in_groups_of if specified padding value is ↵Marcel Molina2006-09-021-2/+11
| | | | | | false. [Marcel Molina Jr.] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4900 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix cases where empty xml nodes weren't being translated to nil in ↵Rick Olson2006-09-011-1/+1
| | | | | | Hash.create_from_xml [Rick Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4895 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Eliminate Active Support warnings.Jeremy Kemper2006-08-291-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4839 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* DateTime#to_time gives hour/minute/second resolution. Closes #5747.Jeremy Kemper2006-08-071-4/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4718 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* attr_internal to support namespacing and deprecationJeremy Kemper2006-08-072-0/+32
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4692 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Raise fully qualified names upon name errors. Closes #5533.Nicholas Seckar2006-08-051-1/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4681 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add extention to obtain the missing constant from NameError instancesNicholas Seckar2006-08-051-0/+15
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4679 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Thoroughly document inflections. Closes #5700.Jeremy Kemper2006-08-031-11/+38
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4654 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Module#alias_attribute [Jamis/DHH]David Heinemeier Hansson2006-08-032-3/+32
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4653 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Strip boolean XML content before checking for 'true' [Rick Olson]Rick Olson2006-07-211-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4616 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Get rid of constant redefinition warnings when running AP testsMarcel Molina2006-07-131-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4610 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Customize default BigDecimal formatting. [dave@pragprog.com]Marcel Molina2006-07-132-0/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4608 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Correctly convert <foo nil=true> to nil when using Hash.create_from_xml. [Rick]Rick Olson2006-07-131-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4607 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Optional identity for Enumerable#sum defaults to zero. Closes #5657.Jeremy Kemper2006-07-091-1/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4599 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* HashWithIndifferentAccess shouldn't confuse false and nil. Closes #5601. Nor ↵Jeremy Kemper2006-07-051-7/+10
| | | | | | should it mistreat legitimate nil values. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4555 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed HashWithIndifferentAccess#default (closes #5586) [chris@seagul.co.uk]David Heinemeier Hansson2006-07-051-4/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4539 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Typo in alias_method_chain rdoc.Jeremy Kemper2006-07-031-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4534 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* More compatible Hash.create_from_xml. Closes #5523.Jeremy Kemper2006-06-291-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4510 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Enumerable#sum without blocks. Closes #5505. Don't assume 0 identity for sum.Jeremy Kemper2006-06-251-5/+12
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4495 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add Enumerable#index_byNicholas Seckar2006-06-241-0/+15
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4491 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Cant use separate module [DHH]David Heinemeier Hansson2006-06-241-2/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4490 5ecf4fe2-1ee6-0310-87b1-e25e094e27de