aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorgbuesing <gbuesing@gmail.com>2008-06-29 15:26:56 -0500
committergbuesing <gbuesing@gmail.com>2008-06-29 15:28:34 -0500
commit6f1d827096ad9f1044a6da7141e7ae720a64ec6b (patch)
tree2db22c2a1c6184445a607a5813f6203ea3a399bb /activesupport
parent676d6a651497b56f31e00db4e7795669de0da672 (diff)
downloadrails-6f1d827096ad9f1044a6da7141e7ae720a64ec6b.tar.gz
rails-6f1d827096ad9f1044a6da7141e7ae720a64ec6b.tar.bz2
rails-6f1d827096ad9f1044a6da7141e7ae720a64ec6b.zip
TimeWithZone#advance: treat :weeks option as variable-length
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/time_with_zone.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb
index 7370a45931..88593eb92d 100644
--- a/activesupport/lib/active_support/time_with_zone.rb
+++ b/activesupport/lib/active_support/time_with_zone.rb
@@ -198,9 +198,9 @@ module ActiveSupport
end
def advance(options)
- # If we're advancing a value of variable length (i.e., years, months, days), advance from #time,
+ # If we're advancing a value of variable length (i.e., years, weeks, months, days), advance from #time,
# otherwise advance from #utc, for accuracy when moving across DST boundaries
- if options.detect {|k,v| [:years, :months, :days].include? k}
+ if options.detect {|k,v| [:years, :weeks, :months, :days].include? k}
method_missing(:advance, options)
else
utc.advance(options).in_time_zone(time_zone)