From 5120429c3138d46490a1c4a611ebd93410f4f885 Mon Sep 17 00:00:00 2001 From: Geoff Buesing Date: Sun, 8 Feb 2009 23:40:42 -0600 Subject: TimeWithZone#advance: use #any? instead of #detect --- activesupport/lib/active_support/time_with_zone.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.3