aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge commit 'brynary/fix-master-warnings'Jeremy Kemper2009-11-091-0/+1
|\ \ | |/ |/|
| * Fix Ruby warning: method redefined; discarding old breakpointBryan Helmkamp2009-11-091-0/+1
| |
* | Bundle I18n 0.2.0.José Valim2009-11-091-1/+1
|/
* Ruby 1.9.2: work around changes to flatten and nil.to_strJeremy Kemper2009-11-081-1/+2
|
* Since we require 1.8.7 we don't need to shim instance_exec anymoreYehuda Katz2009-11-071-27/+0
|
* Break up inflector to reduce the dependency burden on dependency-les methods ↵Yehuda Katz2009-11-071-0/+2
| | | | like constantize.
* Clarify date/time dependenciesJeremy Kemper2009-11-022-0/+2
|
* Consolidate Object#to_param and #to_query core extensionsJeremy Kemper2009-11-029-67/+76
|
* Ruby 1.9.2: rational.rb is deprecatedJeremy Kemper2009-11-021-1/+1
|
* Ruby 1.9.2: URI.escape is obsoleteJeremy Kemper2009-11-021-1/+2
|
* Allow :instance_reader to be given to superclass_delegating_accessor as well.José Valim2009-11-011-21/+39
|
* First pass at cleaning up action cachingYehuda Katz2009-10-281-0/+6
|
* Array.wrap(struct) needs to return the wrapped structYehuda Katz2009-10-281-12/+7
|
* This is all that's needed in 1.8.7+Yehuda Katz2009-10-281-10/+11
|
* Replace decaying routing internals w/ rack-mountJoshua Peek2009-10-191-22/+0
|
* Missed cherry-pick from 2e37effd7203cad84459661e11db2be44586cb4fJeremy Kemper2009-10-191-0/+1
|
* Unify class_inheritable_accessor and extlib_inheritable_accessor and allow ↵José Valim2009-10-172-13/+23
| | | | responder to be set in the class level.
* Switch to on-by-default XSS escaping for rails.Michael Koziarski2009-10-082-1/+45
| | | | | | | | | | | | This consists of: * String#html_safe! a method to mark a string as 'safe' * ActionView::SafeBuffer a string subclass which escapes anything unsafe which is concatenated to it * Calls to String#html_safe! throughout the rails helpers * a 'raw' helper which lets you concatenate trusted HTML from non-safety-aware sources (e.g. presantized strings in the DB) * New ERB implementation based on erubis which uses a SafeBuffer instead of a String Hat tip to Django for the inspiration.
* Restore split between require-time and runtime load path mungery. Simplifies ↵Jeremy Kemper2009-09-243-3/+3
| | | | vendor requires.
* Rollback AS bundler work and improve activation of vendored dependenciesJoshua Peek2009-09-133-3/+3
|
* require reporting before attempting to "shush"Joshua Peek2009-09-131-0/+2
|
* Shush, rexmlJeremy Kemper2009-09-131-2/+2
|
* Duplicating the options hash in Date#advance to prevent modification of the ↵Jay Pignata2009-08-311-0/+1
| | | | | | original [#1133 state:resolved] Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Correct Regexp#un/optionalize assertions and fix uncovered failuresJeffrey Hardy2009-08-261-0/+2
| | | | | | [#3102 state:incomplete] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Ruby 1.9: fix Time#beginning_of_day inaccuracy due to subtracting a FloatJeremy Kemper2009-08-221-1/+2
|
* Allow superclass_delegating_accessor to take a block for initial set.Yehuda Katz2009-08-111-3/+4
|
* Got overhead down from 127 to 85. All tests pass:Yehuda Katz2009-08-111-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | * Tentatively replaced HeaderHash with SimpleHeaderHash, which does not preserve case but does handle converting Arrays to Strings in to_hash. This requires further discussion. * Moved default_charset to ActionDispatch::Response to avoid having to hop over to ActionController. Ideally, this would be a constant on AD::Response, but some tests expect to be able to change it dynamically and I didn't want to change them yet. * Completely override #initialize from Rack::Response. Previously, it was creating a HeaderHash, and then we were creating an entirely new one. There is no way to call super without incurring the overhead of creating a HeaderHash. * Override #write from Rack::Response. Its implementation tracks Content-Length, and doing so adds additional overhead that could be mooted if other middleware changes the body. It is more efficiently done at the top-level server. * Change sending_file to an instance_variable instead of header inspection. In general, if a state is important, it should be set as a property of the response not reconstructed later. * Set the Etag to @body instead of .body. AS::Cache.expand_cache_key handles Arrays fine, and it's more efficient to let it handle the body parts, since it is not forced to create a joined String. * If we detect the default cache control case, just set it, rather than setting the constituent parts and then running the normal (expensive) code to generate the string.
* Allow delegating to nil, because the method might actually exist on itBryan Helmkamp2009-08-101-4/+9
|
* Support deep-merging HashWithIndifferentAccess.Andrew Moreland2009-08-091-4/+5
| | | | | | [#2732 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Fix that Hash#to_xml and Array#to_xml shouldn't modify their options hashes ↵David Burger2009-08-092-0/+2
| | | | | | [#672 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Remove unnecessary &block from Range#sum and add tests for (num..float).sumPratik Naik2009-08-091-1/+1
|
* Optimize Range#sum only for integers [#2489]José Valim2009-08-091-2/+3
|
* Setting usec (and nsec for Ruby 1.9) on Time#end_of_* methods [#1255 ↵Hugo Peixoto2009-08-091-8/+8
| | | | | | status:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Optimize Range#sum to use arithmetic progression when a block is not given ↵José Valim2009-08-091-0/+9
| | | | | | [#2489]. Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Temporary fix to get our LoadError monkey-patch working with newer JRuby. We ↵Yehuda Katz2009-08-091-1/+2
| | | | should probably remove MissingSourceFile and just monkey-patch LoadError instead of overriding LoadError.new.
* Enumerable#sum now works will all enumerables, even if they don't respond to ↵Marc-Andre Lafortune2009-08-081-4/+2
| | | | | | | | :size [#2489 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Extract String#bytesize shimJeremy Kemper2009-08-012-3/+7
|
* Merge docrailsPratik Naik2009-07-254-4/+4
|
* * don't include String#% for Ruby 1.9Sven Fuchs2009-07-181-73/+79
| | | | | | | | | | * raise a KeyError exception for missing named interpolation args (like Ruby 1.9 does) * raise an ArgumentError when mixing named and unnamed placeholders (like Ruby 1.9 does) * improve docs and comply a bit more w/ Rails names/conventions [#2870 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* ActiveSupport Hash optimizations [#2902 state:resolved]Lourens Naude2009-07-153-3/+3
| | | | Signed-off-by: Carl Lerche <carllerche@mac.com>
* Ruby 1.9 style String interpolation support for lower ruby versions. Thanks ↵Lawrence Pit2009-07-072-0/+88
| | | | | | to code from Masao Mutoh's GetText gem. [#2870 state:resolved] Signed-off-by: Yehuda Katz <wycats@yehuda-katzs-macbookpro41.local>
* Friendlier runtime exception if delegatee is nilJeremy Kemper2009-06-181-3/+9
|
* Delegated methods report the expected file/line in backtracesJeremy Kemper2009-06-181-2/+3
|
* Move model naming into ActiveModelJoshua Peek2009-06-172-26/+0
|
* Require missing file in ASYehuda Katz + Carl Lerche2009-06-151-0/+2
|
* moves reopening of core classes to add generic stuff from Action Pack to ↵Xavier Noria2009-06-135-0/+43
| | | | | | | | AS/core_ext and adds tests [#2798 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Bytes calculation speed upLuca Guidi2009-06-131-8/+15
| | | | | | [#2800 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* uses Object#metaclass and Object#class_eval in a few spotsXavier Noria2009-06-121-1/+1
| | | | | | [#2797 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Add #element and #collection to ModelNameJeremy Kemper2009-06-081-3/+5
|
* Don't rely on Rails.loggerJeremy Kemper2009-06-081-2/+4
|