diff options
author | Geoff Buesing <gbuesing@gmail.com> | 2009-02-08 23:40:42 -0600 |
---|---|---|
committer | Geoff Buesing <gbuesing@gmail.com> | 2009-02-08 23:40:42 -0600 |
commit | 5120429c3138d46490a1c4a611ebd93410f4f885 (patch) | |
tree | 82ae49f689d8a5bb02a32aee38ae356d3fdb07e9 /activesupport | |
parent | 887434f75fc0a207ac7184debcd3074802758952 (diff) | |
download | rails-5120429c3138d46490a1c4a611ebd93410f4f885.tar.gz rails-5120429c3138d46490a1c4a611ebd93410f4f885.tar.bz2 rails-5120429c3138d46490a1c4a611ebd93410f4f885.zip |
TimeWithZone#advance: use #any? instead of #detect
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/time_with_zone.rb | 2 |
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) |