aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext
Commit message (Collapse)AuthorAgeFilesLines
...
* Backports Date#>> from 1.9 so that calculations do the right thing around ↵Xavier Noria2010-05-091-0/+18
| | | | | | | | | | the calendar reform Our next_month gives November for some late dates in September of 1582. Related methods, last_*, and in general advance have the same issues. This commit fixes those, see the test suite for expected behavior, which we still run in 1.9 to ensure it matches as we do with other methods defined in Date in 1.9.
* let Time.time_with_datetime_fallback handle properly years in the range 0..138Xavier Noria2010-05-052-3/+11
|
* date/conversions needs time/calculations for (utc|local)_timeXavier Noria2010-05-031-0/+1
|
* let Date.yesterday and Date.tomorrow be based on Date.current rather than ↵Xavier Noria2010-05-021-2/+2
| | | | Date.today
* Move several configuration values from Hash to ActiveSupport::XmlMini, which ↵José Valim2010-04-295-168/+34
| | | | | | both Hash and Array depends on. Also, refactored ActiveModel serializers to just use ActiveSupport::XmlMini.to_tag. As consequence, if a serialized attribute is an array or a hash, it's not encoded as yaml, but as a hash or array.
* array.to_xml should be able to handle all types of data elements [#4490 ↵Neeraj Singh2010-04-295-65/+74
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Use explicit source encoding rather than forced UTF-8 from US-ASCII.Santiago Pastorino2010-04-261-1/+2
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Use Config::CONFIG['host_os'] instead of RUBY_PLATFORM [#4477 state:resolved]Anil Wadghule2010-04-261-1/+2
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* updates String#to_(date|date_time|time) to return nil for blank stringsDaniel Neighman2010-04-211-0/+3
|
* much complete rdoc for String#ordXavier Noria2010-04-191-3/+19
|
* revises the rdoc of String#ordXavier Noria2010-04-191-1/+5
|
* remove code for Ruby < 1.8.7Santiago Pastorino2010-04-181-12/+0
|
* removes code written for Ruby < 1.8.7Xavier Noria2010-04-171-7/+0
|
* Added missing require and delete unused one on proc.rbSantiago Pastorino2010-04-131-1/+1
|
* Not using class_eval wasn't adding clarity herewycats2010-04-101-15/+24
|
* Made arrays of ActiveRecords, and any classes, with namespaces convert to ↵mfoster2010-04-101-1/+1
| | | | | | valid xml. [#3824 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* fix stack trace lines on class_evalSantiago Pastorino2010-04-093-3/+3
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* fisting stack trace [#4349 state:resolved]Aaron Patterson2010-04-081-1/+1
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* moves Object#singleton_class to Kernel#singleton_class to match Ruby also ↵Xavier Noria2010-04-056-7/+7
| | | | there, same for #class_eval to simplify, and adds coverage for class_eval
* Fix class_attribute so that it works with singleton classes.Carl Lerche2010-04-011-1/+1
|
* Revert "Hash#symbolize_keys(!) optimizations"Jeremy Kemper2010-03-291-1/+1
| | | | | | | | Was slower in common case. [#3891 state:open] This reverts commit 2060977b767061a42eb8db2d5c3a30d205a94123.
* Ruby 1.9.2: marshaling round-trips Time#zoneJeremy Kemper2010-03-282-26/+56
|
* Actually check the value of the ivarwycats2010-03-271-4/+2
|
* LINE on class_eval need + 1, also removed comments [#4281 state:committed]Santiago Pastorino2010-03-272-44/+47
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* flatten not needed hereSantiago Pastorino2010-03-271-2/+2
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Remove stray instance variable to resolve serialization problem [#3769 ↵wycats2010-03-271-3/+9
| | | | state:resolved] (ht: Joe Rafaniello)
* Don't write to /dev/null on mingw. [#3921 state:resolved] (ht: Patrick ↵wycats2010-03-271-1/+1
| | | | Daryll Glandien)
* Limit Array#extract_options! to directl instances of Hash and HWIA. Add ↵wycats2010-03-271-1/+16
| | | | extractable_options? to Hash so that subclasses of Hash can opt-into extractable behavior. This fixes an issue where respond_with wasn't working with subclasses of Hash that were provided by other libraries (such as CouchDB or Mashie) [#4145 state:resolved]
* fixing inconsistency with cattr_reader and matter_reader [#4172 state:resolved]Kabari Hendrick2010-03-272-10/+17
| | | Signed-off-by: wycats <wycats@gmail.com>
* Merge branch 'master' into docrailswycats2010-03-2611-8/+54
|\
| * Add support for a type=binary with an optional encoding=base64. If the ↵Josh Franklin2010-03-261-0/+9
| | | | | | | | | | | | encoding attribute is absent, the data is considered unencoded. [#2966 state:resolved]
| * avoid active_support/core_ext/time/conversions.rb warningsSantiago Pastorino2010-03-211-0/+1
| | | | | | | | | | | | [#4250 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
| * Singleton classes returns parent's methods with instance_methods(false) and ↵José Valim2010-03-191-1/+3
| | | | | | | | this makes remove_method in Module#delegate fail. Add a test case and fix the bug.
| * AS datetime conversions now require AS time conversionssnusnu2010-03-181-0/+1
| |
| * Require AS singleton_class code in AS output_safetysnusnu2010-03-171-1/+2
| | | | | | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
| * Move require closer to homeJeremy Kemper2010-03-171-0/+1
| |
| * fixing activerecord tests [#4205 state:resolved]Aaron Patterson2010-03-171-2/+2
| | | | | | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
| * Fix some more warnings on 1.9wycats2010-03-171-0/+2
| |
| * Remove some 1.9 warnings (resulting in some fixed bugs). Remaining AM ↵wycats2010-03-175-5/+23
| | | | | | | | warnings are in dependencies.
| * Eliminate warnings for AM on 1.8wycats2010-03-163-2/+13
| |
* | Merge remote branch 'mainstream/master'Pratik Naik2010-03-151-5/+1
|\|
| * to_str works hereJeremy Kemper2010-03-151-5/+1
| |
* | Merge remote branch 'mainstream/master'Pratik Naik2010-03-1214-123/+71
|\| | | | | | | | | | | | | Conflicts: activerecord/lib/active_record/base.rb railties/lib/rails/configuration.rb railties/lib/rails/log_subscriber.rb
| * Be sure to pass through args to to_yamlJeremy Kemper2010-03-111-2/+2
| |
| * Write strings to fragment cache, not outputbuffersJeremy Kemper2010-03-111-1/+5
| |
| * OutputBuffer#to_yaml should return string yaml, not some custom class dumpJeremy Kemper2010-03-111-0/+4
| |
| * class_attribute gets instance methods which delegate to but may override ↵Jeremy Kemper2010-03-081-2/+23
| | | | | | | | their class values as you'd expect. Disable instance writer methods with :instance_writer => false.
| * Make many parts of Rails lazy. In order to facilitate this,wycats2010-03-072-92/+1
| | | | | | | | | | | | | | | | | | | | | | | | add lazy_load_hooks.rb, which allows us to declare code that should be run at some later time. For instance, this allows us to defer requiring ActiveRecord::Base at boot time purely to apply configuration. Instead, we register a hook that should apply configuration once ActiveRecord::Base is loaded. With these changes, brings down total boot time of a new app to 300ms in production and 400ms in dev. TODO: rename base_hook
| * Inflection dependency, [#4067 status:resolved]Jason King2010-03-031-1/+3
| | | | | | | | Signed-off-by: José Valim <jose.valim@gmail.com>
| * Hash#symbolize_keys(!) optimizationsLourens Naudé2010-03-011-1/+1
| | | | | | | | | | | | [#3891 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>