Commit Graph

483 Commits

Author SHA1 Message Date
Jamis Buck
f28eef9a27 Add Object#acts_like? and Time#acts_like_time? and Date#acts_like_date? to facilitate duck-typing
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5951 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-15 17:12:32 +00:00
Jamis Buck
8368e160b4 Make sure Duration uses duck-typing instead of explicit classes, so apps can pass proxy objects around and have it all "just work"
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5948 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-15 16:47:51 +00:00
Michael Koziarski
276c9f29cd Make 1.months and friends accurate by introducing a Duration class. #6835 [eventualbuddha]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5940 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-15 06:54:50 +00:00
Jeremy Kemper
6714b39a13 Document Inflector.ordinalize and merge docs from String inflections. Closes #7023.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5924 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-14 12:18:51 +00:00
Jeremy Kemper
7b07baac27 Unbundle flexmock.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5917 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-13 07:15:07 +00:00
Jeremy Kemper
0a06ffc08e tighten test_load_once_paths_should_behave_when_recursively_loading
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5816 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-01 00:25:30 +00:00
Jeremy Kemper
cbe0c3c54f Check for nil name also. Closes #6561.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5814 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-31 23:53:05 +00:00
David Heinemeier Hansson
7ed7930769 Make RDoc not spew errors on install because of HTML comments in code comments
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5813 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-31 19:28:28 +00:00
Nicholas Seckar
91b71ed30c Fix Dependencies.autoloaded? to ignore anonymous modules. Closes #6561.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5811 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-31 18:53:58 +00:00
David Heinemeier Hansson
d88e83f211 False is a reasonable default
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5793 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-27 00:42:31 +00:00
Nicholas Seckar
e2acd16810 Update load once paths to prevent nested once constants from being detected and claimed by an external non-once load. References #6720
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5782 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-24 14:53:35 +00:00
Nicholas Seckar
1e170da30d Checkin failing test case related to load once paths
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5781 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-24 14:41:29 +00:00
Jeremy Kemper
01452feff1 DeprecatedInstanceVariable#inspect doesn't warn since test/unit, error logs, and others use it for diagnostics.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5763 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-20 21:28:31 +00:00
Jeremy Kemper
d68f559640 Don't require test/unit since it tries to turn everything into a test run.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5740 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-18 20:59:40 +00:00
Jeremy Kemper
8a73d4fe6f Deprecation: silence warnings when reporting test errors.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5728 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-17 08:21:45 +00:00
Jeremy Kemper
86deb27095 Hash#slice(*keys) returns a new hash with only the given keys. #slice! 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
2006-12-17 00:49:41 +00:00
Jeremy Kemper
05a5209f82 HashWithIndifferentAccess#to_hash converts to a Hash with String keys and 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
2006-12-16 23:48:24 +00:00
Jeremy Kemper
0fc8056975 Silence warnings; use more precise assertions.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5724 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-16 23:45:44 +00:00
Nicholas Seckar
6a485c3100 Fix remove_constant to correctly handle constant names of the form "::A::...". References #6720.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5710 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-09 05:21:33 +00:00
David Heinemeier Hansson
0297b31b82 Fixed Array#to_xml when it contains a series of hashes (each piece would get its own XML declaration) (closes #6610) [thkarcher/cyu]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5668 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-03 16:47:53 +00:00
David Heinemeier Hansson
eacca8d7e6 Added Time#to_s(:time) which will just return H:M, like 17:44 [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5628 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-25 23:56:28 +00:00
Jeremy Kemper
44e6aa7e19 Improve readability.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5547 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-17 14:09:46 +00:00
Jeremy Kemper
38136d615e Grep slightly faster than select =~
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5546 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-17 14:09:04 +00:00
Jeremy Kemper
615d05f5de Test autoloading nested subclass of parent.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5541 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-16 22:50:46 +00:00
Marcel Molina
309a6bd550 Add Module#attr_accessor_with_default to initialize value of attribute 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
2006-11-16 19:35:13 +00:00
Jeremy Kemper
072985bc28 Handle failed caller parsing, factor out deprecation caller message.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5535 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-16 06:40:05 +00:00
David Heinemeier Hansson
6c271a98dc Fix end of day
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5523 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-14 17:39:00 +00:00
Jeremy Kemper
b97ffa2a4f Hash#to_xml handles keys with the same name as Kernel methods. Closes #6613.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5521 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-14 09:08:40 +00:00
David Heinemeier Hansson
79c309e43b Added Time#end_of_day to get 23:59:59 of that day [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5495 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-12 03:05:18 +00:00
Sam Stephenson
2516063f61 Don't quote hash keys in Hash#to_json if they're valid JavaScript identifiers.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5486 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-11 18:25:26 +00:00
Rick Olson
510092c681 Lazily load the Unicode Database in the UTF-8 Handler [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5476 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-09 19:40:32 +00:00
Nicholas Seckar
ad06514257 Update dependencies to delete partially loaded constants.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5464 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-07 20:45:36 +00:00
Jeremy Kemper
e1140f876e Update failing autoload tests.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5463 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-07 20:29:50 +00:00
Nicholas Seckar
a7d0e0e011 Fix warning and incorrect test trigger
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5444 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-06 23:45:39 +00:00
Jeremy Kemper
07c51829ab Failing test for autoloading shadowed exceptions.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5440 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-06 19:23:30 +00:00
Jeremy Kemper
7b453d2844 Fix unicode JSON regexp for Onigurama compatibility. Closes #6494.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5432 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-05 19:03:37 +00:00
Jeremy Kemper
9a39a86f65 Test multiple timezones' DST. Closes #5617.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5420 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-03 00:40:34 +00:00
Jeremy Kemper
6770c8d7fa Use US timezone for DST tests. Closes #5617.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5418 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-02 20:36:06 +00:00
Michael Koziarski
ea433f15bf update XmlSimple to 1.0.10. Closes #6532. [nicksieger]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5414 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-02 20:10:53 +00:00
Jeremy Kemper
0ee5d64c34 Remove dupe entry.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5410 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-02 19:14:16 +00:00
David Heinemeier Hansson
4559840a32 Resolved the conflict
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5407 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-02 18:14:16 +00:00
Jeremy Kemper
7ca2b657f0 Update bundled flexmock to latest 0.4.3.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5403 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-02 09:59:52 +00:00
Jeremy Kemper
5ba85d84fb next_week respects DST changes. Closes #5617, closes #2353, closes #2509, references #4551.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5388 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-02 01:52:11 +00:00
Nicholas Seckar
5cc682da07 Update dependencies to allow constants to be defined alongside their siblings.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5386 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-01 23:21:13 +00:00
Jeremy Kemper
0f5f05b51e next_week respects DST changes. Closes #6483.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5363 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-24 23:35:27 +00:00
Jamis Buck
3a318970b1 Extend deprecate so that alternatives can be specified via the deprecation
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5356 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-24 16:56:59 +00:00
Marcel Molina
ba5591f212 Expose methods added to Enumerable in the documentation, such as group_by. Closes #6170.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5334 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-22 03:04:50 +00:00
Michael Koziarski
911f3db00a Ensure Chars#tidy_bytes only tidies broken bytes. Closes #6397 [Manfred Stienstra]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5316 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-17 08:29:16 +00:00
Nicholas Seckar
497b5dcf19 Add 'unloadable', a method used to mark any constant as requiring an unload after each request.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5307 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-15 23:32:31 +00:00
Nicholas Seckar
2049313e3c Undo accidental commit
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5303 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-14 20:29:05 +00:00