1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

18 commits

Author SHA1 Message Date
Jeremy Kemper
ee85f15453 Qualify constant lookup in BasicObject 2010-01-07 16:43:25 -08:00
Jeremy Kemper
a323b83acf Remove unneeded reliance on super -> method_missing quirk 2010-01-07 00:06:20 -08:00
Xavier Noria
f15313c0c8 duration.rb needs active_support/core_ext/object/acts_like 2010-01-01 14:28:56 -08:00
Levin Alexander
ab2d6abb55 make #inspect if zero length duration return '0 seconds' instead of empty string [#2838 state:resolved]
Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>
2009-07-02 11:22:25 -07:00
Jeremy Kemper
f28bd9557c Fix dependencies revealed by testing in isolation 2009-04-22 18:54:13 -07:00
David Heinemeier Hansson
6de83562f9 Force all internal calls to Array#to_sentence to use English [#2010 state:resolved] 2009-02-27 14:22:39 +01:00
Jeremy Kemper
49752e6ca5 Duration requires BasicObject in case it's autoloaded early 2008-11-23 16:10:20 -08:00
gbuesing
32b82e4c6f Duration #since and #ago with no argument (e.g., 5.days.ago) return TimeWithZone when config.time_zone is set. Introducing Time.current, which returns Time.zone.now if config.time_zone is set, otherwise just returns Time.now 2008-04-20 21:57:04 -05:00
Jeremy Kemper
ff47ba9adb Ruby 1.9 compat: add #raise to AS::BasicObject, fixup Duration argument error. Closes #10594.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8523 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-02 09:08:14 +00:00
Jeremy Kemper
6743504ba2 Revert const_missing bypass in favor of Duration constant lookup tweak
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8412 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-15 02:30:17 +00:00
Jeremy Kemper
887870f20c Ruby 1.9 compat: define Duration#== [chuyeow]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8399 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-15 02:27:41 +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
1b32a305df Add Date#since, ago, beginning_of_day, and end_of_day. Date + seconds works now. Closes #8575.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6937 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-04 22:00:53 +00:00
Jeremy Kemper
6503da6991 Time durations use since instead of + for accuracy. Closes #8513.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6901 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-30 06:21:08 +00:00
Rick Olson
be7f86e37a Added test coverage for Inflector.inflections.clear. Closes #7179. [Rich Collins]. Remove unused code from Duration#inspect. Closes #7180. [Rich Collins]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6022 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-23 05:32:08 +00:00
Jamis Buck
5314960d8b change Duration to use the new Object#acts_like? helper to do duck typing
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5952 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-15 17:13:45 +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