diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-05-30 06:21:08 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-05-30 06:21:08 +0000 |
commit | 6503da69910beb382b18127c51cd318631245607 (patch) | |
tree | 4095ad542ea7e0ba2e760430ea9a1f52a763be88 /activesupport/lib/active_support/duration.rb | |
parent | a1c88273f4321e203ccf389ccff8a8e043c4f8f9 (diff) | |
download | rails-6503da69910beb382b18127c51cd318631245607.tar.gz rails-6503da69910beb382b18127c51cd318631245607.tar.bz2 rails-6503da69910beb382b18127c51cd318631245607.zip |
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
Diffstat (limited to 'activesupport/lib/active_support/duration.rb')
-rw-r--r-- | activesupport/lib/active_support/duration.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/duration.rb b/activesupport/lib/active_support/duration.rb index 5279c4435a..721bc18795 100644 --- a/activesupport/lib/active_support/duration.rb +++ b/activesupport/lib/active_support/duration.rb @@ -67,7 +67,7 @@ module ActiveSupport parts.inject(time) do |t,(type,number)| if t.acts_like?(:time) if type == :seconds - t + (sign * number) + t.since(sign * number) else t.advance(type => sign * number) end |