aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/time_with_zone.rb
diff options
context:
space:
mode:
authorGeoff Buesing <gbuesing@gmail.com>2009-02-08 23:40:42 -0600
committerGeoff Buesing <gbuesing@gmail.com>2009-02-08 23:40:42 -0600
commit5120429c3138d46490a1c4a611ebd93410f4f885 (patch)
tree82ae49f689d8a5bb02a32aee38ae356d3fdb07e9 /activesupport/lib/active_support/time_with_zone.rb
parent887434f75fc0a207ac7184debcd3074802758952 (diff)
downloadrails-5120429c3138d46490a1c4a611ebd93410f4f885.tar.gz
rails-5120429c3138d46490a1c4a611ebd93410f4f885.tar.bz2
rails-5120429c3138d46490a1c4a611ebd93410f4f885.zip
TimeWithZone#advance: use #any? instead of #detect
Diffstat (limited to 'activesupport/lib/active_support/time_with_zone.rb')
-rw-r--r--activesupport/lib/active_support/time_with_zone.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb
index 5b70df3017..e9e536c267 100644
--- a/activesupport/lib/active_support/time_with_zone.rb
+++ b/activesupport/lib/active_support/time_with_zone.rb
@@ -230,7 +230,7 @@ module ActiveSupport
def advance(options)
# 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, :weeks, :months, :days].include? k}
+ if options.any? {|k,v| [:years, :weeks, :months, :days].include? k}
method_missing(:advance, options)
else
utc.advance(options).in_time_zone(time_zone)