Commit Graph

566 Commits

Author SHA1 Message Date
Jeremy Kemper
cfffedb4d8 Hash#symbolize_keys behaves well with integer keys. Closes #9890.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7945 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-16 18:56:13 +00:00
Jeremy Kemper
ea1eafb6b1 Don't assume ActiveSupport module is already defined
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7917 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-15 10:12:47 +00:00
Jeremy Kemper
656a20a4d3 Multibyte: String#slice supports regexp argument. Closes #9646.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7910 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-15 07:38:52 +00:00
Jeremy Kemper
bb4ebaa858 object.duplicable? returns true if object.dup is safe. False for nil, true, false, symbols, and numbers; true otherwise. References #9333.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7906 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-15 07:11:25 +00:00
Jeremy Kemper
16796dc35f Time, Date and DateTime #advance accept :weeks option. Closes #9866.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7868 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-13 23:56:00 +00:00
Jeremy Kemper
389616e68d Fix Time#years_ago and #years_since from leap days. Closes #9865.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7867 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-13 21:47:45 +00:00
Jeremy Kemper
c7dd2a1c11 Time and DateTime#advance accept :hours, :minutes, and :seconds options. Closes #9825.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7866 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-13 21:44:48 +00:00
Jeremy Kemper
003df72d00 Don't shadow local var with block var
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7865 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-13 21:41:56 +00:00
Jeremy Kemper
01919cee5f Use __FILE__ and __LINE__ for BufferedLogger severity methods
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7864 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-13 21:40:12 +00:00
Jeremy Kemper
a8077355ed Fix Date#years_ago and #years_since from leap days. Closes #9864.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7863 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-13 20:13:18 +00:00
Jeremy Kemper
9e96286e7a Refactor Time and Date#months_since and #months_ago to use #advance. Closes #9863.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7862 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-13 20:12:36 +00:00
David Heinemeier Hansson
faff774f9d Update versions here too
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7843 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-12 16:03:54 +00:00
Jeremy Kemper
aa4165cb7e Bundle xml-simple 1.0.11
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7830 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-10 23:02:11 +00:00
Jeremy Kemper
bf724d4acc Update bundled xml-simple to 1.0.11 and prefer installed gems
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7829 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-10 23:01:55 +00:00
Jeremy Kemper
e7040b09e8 Rebundle Builder 2.1.2 but prefer a newer RubyGem if available.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7828 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-10 23:01:41 +00:00
Jeremy Kemper
d556f46607 Style update for new Range extensions
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7818 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-09 07:49:16 +00:00
Jeremy Kemper
fba05826dc Hash is ordered in Ruby 1.9
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7817 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-09 07:48:59 +00:00
Michael Koziarski
99c64829ce * Add Range#overlaps?(range), Range#include?(range), and Range#step without a block. [brandon] Closes #9746
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7800 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-08 06:05:44 +00:00
Michael Koziarski
b3d9e2372b Documentation for assert_valid_keys. Closes #7264 [tarmo, rsanheim]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7792 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-08 03:30:51 +00:00
Jeremy Kemper
b1e394e67f Builder unbundle message directs to Bulk updating Gem source index for: http://gems.rubyforge.org
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7789 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-08 03:19:39 +00:00
Jeremy Kemper
c90d31eb37 Correct BufferedLogger#level? checks. Closes #9806.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7775 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 18:54:36 +00:00
Jeremy Kemper
2101c25faf Reference current fast_xs URL
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7774 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 09:22:03 +00:00
Jeremy Kemper
845e6ff45a String#to_xs uses the fast_xs extension if available for Builder speedup.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7773 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 09:15:26 +00:00
Jeremy Kemper
34b576700d Introduce BasicObject as Builder::BlankSlate for Ruby 1.9 forward compatibility.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7762 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 01:07:00 +00:00
Jeremy Kemper
1f5c4365a7 Unbundle Builder in favor of a gem dependency.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7761 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 01:05:42 +00:00
Jeremy Kemper
58a5eef53e Disambiguate Time, Date, and DateTime#to_json formatting. Closes #9750.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7746 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-05 09:43:24 +00:00
Jeremy Kemper
335c15005d Bump versions for 1.2.4 release.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7744 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-05 05:20:37 +00:00
Jeremy Kemper
d0755b9814 Disabling auto_flushing still flushes when the buffer hits a maximum size, as a failsafe against memory-gobbling.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7739 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-04 19:52:10 +00:00
Jeremy Kemper
b1968708e1 Hash#to_json takes :only or :except options to specific or omit certain hash keys. Enumerable#to_json passes through its options to each element. Closes #9751.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7736 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-04 03:28:42 +00:00
Jeremy Kemper
f2d7e51da2 Explicitly convert the buffer array to a string before writing to head off compatibility issues with outputs that don't fully quack like an IO.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7734 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-03 23:56:34 +00:00
Jeremy Kemper
748e6873c2 BufferedLogger#auto_flushing = N flushes the log every N messages. Buffers with an array instead of string.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7732 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-03 23:43:12 +00:00
Jeremy Kemper
0ee1cb2cd3 Ruby 1.9 compat, consistent load paths
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-02 05:32:14 +00:00
David Heinemeier Hansson
22dc11c6b1 Fixed Date#xmlschema for dates outside the range of what can be created with Time (closes #9744) [gbuesing]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7707 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-01 02:16:15 +00:00
David Heinemeier Hansson
6ca789bf00 Fixed that La Paz was included in -25200 and -14400 offsets when it should only be in -14400 (closes #9735) [bermi]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7700 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-30 22:56:37 +00:00
David Heinemeier Hansson
7275d2749c Fixed JSON encoding to use quoted keys according to the JSON standard (closes #8762) [choonkat/chuyeow]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7697 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-30 20:57:50 +00:00
Jeremy Kemper
6ea4dd4a65 Mark Test::Unit#assert_difference incompatibility with Ruby 2 due to Proc#binding usage
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7682 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-29 22:08:41 +00:00
Jeremy Kemper
85a08bd99e Test::Unit#assert_difference Ruby 1.9 compat
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7679 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-29 21:29:34 +00:00
Jeremy Kemper
8f68804fba JSON decoding Ruby 1.9 compat. Mark a section that's unnecessarily slow.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7678 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-29 21:27:29 +00:00
David Heinemeier Hansson
e3b49c052b Fixed spelling errors (closes #9706) [tarmo/rmm5t]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7666 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-28 14:18:47 +00:00
Jeremy Kemper
ccb87e2f69 BufferedLogger#add converts the message to a string. Closes #9724.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7664 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-28 14:09:35 +00:00
Jeremy Kemper
5f4d121798 Dependencies Ruby 1.9 compat
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7660 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-27 11:01:20 +00:00
Jeremy Kemper
053d057a88 send -> send! for some private methods
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7659 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-27 10:41:12 +00:00
Jeremy Kemper
b01a7c69fc Alias Object#send to send! for Ruby 1.9 forward compatibility.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7658 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-27 10:38:37 +00:00
Jeremy Kemper
935f821537 Object#copy_instance_variables_from Ruby 1.9 compat
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7654 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-27 10:13:50 +00:00
Jeremy Kemper
d96e38be99 Backport Object#instance_variable_defined? for Ruby < 1.8.6.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7649 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-27 09:26:46 +00:00
Jeremy Kemper
cd1f2d7b0e Date/Time/DateTime Ruby 1.9 compat
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7647 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-27 08:49:18 +00:00
Jeremy Kemper
ae165361c3 Cleanup comment. References #9702, closes #9703.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7645 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-27 06:16:20 +00:00
Jeremy Kemper
6f06ac6e1a BufferedLogger#add doesn't modify the message argument. Closes #9702.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7643 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-27 04:50:58 +00:00
David Heinemeier Hansson
6f0390c957 Add BufferedLogger#add #9667 [tomafro]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7634 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-25 16:41:46 +00:00
David Heinemeier Hansson
79a9c7a702 Added ActiveSupport::BufferedLogger as a duck-typing alternative (albeit with no formatter) to the Ruby Logger, which provides a very nice speed bump (inspired by Ezra's buffered logger) [DHH] Changed the default logger from Ruby's own Logger with the clean_logger extensions to ActiveSupport::BufferedLogger for performance reasons [DHH]. (You can change it back with config.logger = Logger.new(/path/to/log, level).)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7626 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-25 03:47:37 +00:00